|
VTK
9.6.20260509
|
Isosurface extraction using López polygon tracing algorithm. More...
#include <vtkPolyhedronContour.h>
Public Types | |
| enum class | CellClassification { AllInside , AllOutside , Intersected } |
Public Member Functions | |
| vtkPolyhedronContour ()=default | |
| ~vtkPolyhedronContour ()=default | |
| CellClassification | Execute (vtkPolyhedron *cell, vtkDataArray *scalars, double isoValue, vtkIncrementalPointLocator *locator, vtkPointData *inPd, vtkPointData *outPd) |
| Execute isosurface extraction on a polyhedron cell. | |
| int | GetNumberOfIsoPolygons () const |
| Get the number of resulting iso-polygons. | |
| int | GetIsoPolygonSize (int polyIdx) const |
| Get iso-polygon vertex count. | |
| vtkIdType | GetIsoPolygonVertex (int polyIdx, int vertIdx) const |
| Get iso-polygon vertex (output point ID) | |
| void | OutputContours (vtkCellArray *polys, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd) |
| Output contour polygons to cell array (triangulates if needed) | |
| void | OutputClip (vtkPolyhedron *cell, vtkCellArray *connectivity, vtkIncrementalPointLocator *locator, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, int insideOut, vtkCellArray *outFaces=nullptr, vtkCellArray *outFaceLocs=nullptr) |
| Output clipped polyhedron faces to connectivity array. | |
Static Public Member Functions | |
| static void | ContourCell (vtkIdType numPointIds, const vtkIdType *pointIds, vtkCellArray *polyhedronFaces, vtkDataArray *scalars, double isoValue, bool generateTriangles, std::vector< vtkIdType > &polygonsSize, std::vector< EdgeTuple< vtkIdType, double > > &intersectedEdges) |
| ContourCell for a single polyhedron. | |
| static void | CountClip (vtkIdType numPointIds, const vtkIdType *pointIds, vtkCellArray *polyhedronFaces, vtkDataArray *scalars, double isoValue, bool insideOut, vtkIdType &numOutputCells, vtkIdType &numOutputCellConnectivity, vtkIdType &numOutputFaces, vtkIdType &numOutputFacesConnectivity, std::vector< EdgeTuple< vtkIdType, double > > &intersectedEdges) |
| Pass 1: Count clip output sizes for a single polyhedron. | |
| static void | EmitClip (vtkIdType numPointIds, const vtkIdType *pointIds, vtkCellArray *polyhedronFaces, vtkDataArray *scalars, double isoValue, bool insideOut, vtkDataArray *pointMap, vtkIdType numberOfKeptPoints, const vtkStaticEdgeLocatorTemplate< vtkIdType, double > &edgeLocator, vtkCellArray *outputCells, vtkCellArray *outputFaces) |
| Pass 2: Emit clipped polyhedron for a single cell. | |
Isosurface extraction using López polygon tracing algorithm.
Isosurface extraction for arbitrary polyhedra using polygon tracing.
Implementation of the polygon-tracing algorithm for isosurface extraction:
J. López, A. Esteban, J. Hernández, P. Gómez, R. Zamora, C. Zanzi, F. Faura, "A new isosurface extraction method on arbitrary grids", Journal of Computational Physics, Volume 444, 2021, 110579. https://doi.org/10.1016/j.jcp.2021.110579
Reference implementation (isoap library): https://doi.org/10.17632/4rcf98s74c.1
The algorithm works by:
Key insight: Each iso-vertex has a "key face" where the edge transitions from outside→inside. Polygon tracing simply walks to the next iso-vertex on each key face until returning to the start.
Definition at line 53 of file vtkPolyhedronContour.h.
|
strong |
| Enumerator | |
|---|---|
| AllInside | |
| AllOutside | |
| Intersected | |
Definition at line 59 of file vtkPolyhedronContour.h.
|
default |
|
default |
| CellClassification vtkPolyhedronContour::Execute | ( | vtkPolyhedron * | cell, |
| vtkDataArray * | scalars, | ||
| double | isoValue, | ||
| vtkIncrementalPointLocator * | locator, | ||
| vtkPointData * | inPd, | ||
| vtkPointData * | outPd ) |
Execute isosurface extraction on a polyhedron cell.
| cell | The polyhedron cell |
| scalars | Scalar values at cell vertices (local indexing) |
| isoValue | The isosurface value |
| locator | Point locator for output points |
| inPd | Input point data for interpolation |
| outPd | Output point data |
|
inline |
Get the number of resulting iso-polygons.
Definition at line 83 of file vtkPolyhedronContour.h.
|
inline |
Get iso-polygon vertex count.
Definition at line 88 of file vtkPolyhedronContour.h.
|
inline |
Get iso-polygon vertex (output point ID)
Definition at line 96 of file vtkPolyhedronContour.h.
| void vtkPolyhedronContour::OutputContours | ( | vtkCellArray * | polys, |
| vtkCellData * | inCd, | ||
| vtkIdType | cellId, | ||
| vtkCellData * | outCd ) |
Output contour polygons to cell array (triangulates if needed)
| void vtkPolyhedronContour::OutputClip | ( | vtkPolyhedron * | cell, |
| vtkCellArray * | connectivity, | ||
| vtkIncrementalPointLocator * | locator, | ||
| vtkPointData * | inPd, | ||
| vtkPointData * | outPd, | ||
| vtkCellData * | inCd, | ||
| vtkIdType | cellId, | ||
| vtkCellData * | outCd, | ||
| int | insideOut, | ||
| vtkCellArray * | outFaces = nullptr, | ||
| vtkCellArray * | outFaceLocs = nullptr ) |
Output clipped polyhedron faces to connectivity array.
If outFaces and outFaceLocs are provided, faces are written directly into those arrays (bypassing the embedded face-stream format). The caller is responsible for ensuring outFaces and outFaceLocs are initialized. If null, falls back to the embedded polyhedron face-stream format.
|
static |
ContourCell for a single polyhedron.
| numPointIds | Number of unique points in this cell |
| pointIds | Global point IDs for this cell, [numPointIds] |
| polyhedronFaces | Polyhedron faces |
| scalars | Scalar array (indexed by global point ID) |
| isoValue | Clip value |
| generateTriangles | If true, output.PolyConn is triangle soup. |
| polygonsSize | [out] Polygon vertex counts (num vertices per polygon, size NPolys). Make sure to clear it before adding. |
| intersectedEdges | [out] Intersected Edges defined as (globalPtId0, globalPtId1, t). Make sure to clear it before adding. |
|
static |
Pass 1: Count clip output sizes for a single polyhedron.
| numPointIds | Number of unique points in this cell |
| pointIds | Global point IDs for this cell, [numPointIds] |
| polyhedronFaces | Polyhedron faces |
| scalars | Scalar array (indexed by global point ID) |
| isoValue | Clip value |
| insideOut | If true, retain the outside portion |
| numOutputCells | [out] Number of output cells (0 or 1) |
| numOutputCellConnectivity | [out] Total output points (surviving + iso-vertices) |
| numOutputFaces | [out] Number of output faces (clipped originals + caps) |
| numOutputFacesConnectivity | [out] Total face stream connectivity size |
| intersectedEdges | [out] Intersected Edges defined as (globalPtId0, globalPtId1, t). Make sure to clear it before adding. |
|
static |
Pass 2: Emit clipped polyhedron for a single cell.
| numPointIds | Number of unique points in this cell |
| pointIds | Global point IDs for this cell, [numPointIds] |
| polyhedronFaces | Polyhedron faces |
| scalars | Scalar array (indexed by global point ID) |
| isoValue | Clip value |
| insideOut | If true, retain the outside portion |
| pointMap | Map that returns the output point id of an input point Use GetIntegerTuple to access its values |
| numberOfKeptPoints | Number of input points that are retained in the output) |
| edgeLocator | Edge locator to get the edge id for a pair of point ids Use IsEdgeInserted to get the output edge id. To compute the output edge point id, add numberOfKeptPoints to it. |
| outputCells | [out] Global point IDs of each output cell (polyhedron has only 1) Make sure to Reset it before adding anything to it. |
| outputFaces | [out] Faces of the single output polyhedron Make sure to Reset it before adding anything to it. |