|
VTK
9.6.20260516
|
Lookup tables for marching cells contouring. More...
#include <vtkMarchingCellsContourCases.h>
Public Types | |
| using | CellCase = const int* |
| Generic interface to retrieve a contour case entry for any supported cell type. | |
| using | CellCaseWithPolygons = const int* |
| Generic interface to retrieve a contour case entry that generates polygons or line segments for any supported cell type. | |
| using | Edge = int[2] |
| Returns the edge definitions for the given cell type as an array of point index pairs, where each pair defines one edge of the cell. | |
| using | EdgeArray = const Edge* |
Static Public Member Functions | |
| static CellCase | GetCellCase (int cellType, uint8_t caseIndex) |
| static CellCaseWithPolygons | GetCellCaseWithPolygons (int cellType, uint8_t caseIndex) |
| static EdgeArray | GetCellEdges (int cellType) |
| using | LineCase = int[3] |
| Case tables for a line cell (VTK_LINE). | |
| static const LineCase * | GetLineCases () |
| Case tables for a line cell (VTK_LINE). | |
| static const LineCase & | GetLineCase (uint8_t caseIndex) |
| Case tables for a line cell (VTK_LINE). | |
| using | TriangleCase = int[3] |
| Case tables for a triangle cell (VTK_TRIANGLE). | |
| static const TriangleCase * | GetTriangleCases () |
| Case tables for a triangle cell (VTK_TRIANGLE). | |
| static const TriangleCase & | GetTriangleCase (uint8_t caseIndex) |
| Case tables for a triangle cell (VTK_TRIANGLE). | |
| using | PixelCase = int[5] |
| Case tables for a pixel cell (VTK_PIXEL). | |
| static const PixelCase * | GetPixelCases () |
| Case tables for a pixel cell (VTK_PIXEL). | |
| static const PixelCase & | GetPixelCase (uint8_t caseIndex) |
| Case tables for a pixel cell (VTK_PIXEL). | |
| using | QuadCase = int[5] |
| Case tables for a quad cell (VTK_QUAD). | |
| static const QuadCase * | GetQuadCases () |
| Case tables for a quad cell (VTK_QUAD). | |
| static const QuadCase & | GetQuadCase (uint8_t caseIndex) |
| Case tables for a quad cell (VTK_QUAD). | |
| using | TetraCase = int[7] |
| Case tables for a tetrahedron cell (VTK_TETRA). | |
| static const TetraCase * | GetTetraCases () |
| Case tables for a tetrahedron cell (VTK_TETRA). | |
| static const TetraCase & | GetTetraCase (uint8_t caseIndex) |
| Case tables for a tetrahedron cell (VTK_TETRA). | |
| using | VoxelCase = int[16] |
| Case tables for a voxel cell (VTK_VOXEL). | |
| static const VoxelCase * | GetVoxelCases () |
| Case tables for a voxel cell (VTK_VOXEL). | |
| static const VoxelCase & | GetVoxelCase (uint8_t caseIndex) |
| Case tables for a voxel cell (VTK_VOXEL). | |
| using | HexahedronCase = int[16] |
| Case tables for a hexahedron cell (VTK_HEXAHEDRON). | |
| static const HexahedronCase * | GetHexahedronCases () |
| Case tables for a hexahedron cell (VTK_HEXAHEDRON). | |
| static const HexahedronCase & | GetHexahedronCase (uint8_t caseIndex) |
| Case tables for a hexahedron cell (VTK_HEXAHEDRON). | |
| using | WedgeCase = int[13] |
| Case tables for a wedge cell (VTK_WEDGE). | |
| static const WedgeCase * | GetWedgeCases () |
| Case tables for a wedge cell (VTK_WEDGE). | |
| static const WedgeCase & | GetWedgeCase (uint8_t caseIndex) |
| Case tables for a wedge cell (VTK_WEDGE). | |
| using | PyramidCase = int[13] |
| Case tables for a pyramid cell (VTK_PYRAMID). | |
| static const PyramidCase * | GetPyramidCases () |
| Case tables for a pyramid cell (VTK_PYRAMID). | |
| static const PyramidCase & | GetPyramidCase (uint8_t caseIndex) |
| Case tables for a pyramid cell (VTK_PYRAMID). | |
| using | TetraCaseWithPolygons = int[6] |
| Polygon case tables for a tetrahedron cell (VTK_TETRA). | |
| static const TetraCaseWithPolygons * | GetTetraCasesWithPolygons () |
| Polygon case tables for a tetrahedron cell (VTK_TETRA). | |
| static const TetraCaseWithPolygons & | GetTetraCaseWithPolygons (uint8_t caseIndex) |
| Polygon case tables for a tetrahedron cell (VTK_TETRA). | |
| using | VoxelCaseWithPolygons = int[17] |
| Polygon case tables for a voxel cell (VTK_VOXEL). | |
| static const VoxelCaseWithPolygons * | GetVoxelCasesWithPolygons () |
| Polygon case tables for a voxel cell (VTK_VOXEL). | |
| static const VoxelCaseWithPolygons & | GetVoxelCaseWithPolygons (uint8_t caseIndex) |
| Polygon case tables for a voxel cell (VTK_VOXEL). | |
| using | HexahedronCaseWithPolygons = int[17] |
| Polygon case tables for a hexahedron cell (VTK_HEXAHEDRON). | |
| static const HexahedronCaseWithPolygons * | GetHexahedronCasesWithPolygons () |
| Polygon case tables for a hexahedron cell (VTK_HEXAHEDRON). | |
| static const HexahedronCaseWithPolygons & | GetHexahedronCaseWithPolygons (uint8_t caseIndex) |
| Polygon case tables for a hexahedron cell (VTK_HEXAHEDRON). | |
| using | WedgeCaseWithPolygons = int[10] |
| Polygon case tables for a wedge cell (VTK_WEDGE). | |
| static const WedgeCaseWithPolygons * | GetWedgeCasesWithPolygons () |
| Polygon case tables for a wedge cell (VTK_WEDGE). | |
| static const WedgeCaseWithPolygons & | GetWedgeCaseWithPolygons (uint8_t caseIndex) |
| Polygon case tables for a wedge cell (VTK_WEDGE). | |
| using | PyramidCaseWithPolygons = int[9] |
| Polygon case tables for a pyramid cell (VTK_PYRAMID). | |
| static const PyramidCaseWithPolygons * | GetPyramidCasesWithPolygons () |
| Polygon case tables for a pyramid cell (VTK_PYRAMID). | |
| static const PyramidCaseWithPolygons & | GetPyramidCaseWithPolygons (uint8_t caseIndex) |
| Polygon case tables for a pyramid cell (VTK_PYRAMID). | |
Lookup tables for marching cells contouring.
vtkMarchingCellsContourCases provides the edge intersection tables used by marching cells algorithms to generate contours (isosurfaces/isolines) for each supported cell type.
For each cell, a case index is computed as a bitmask where bit i is set if vertex i's scalar value is strictly greater than the isovalue. This index is then used to look up the edges that the contour intersects.
The number of cases per cell type is 2^N where N is the number of vertices:
| Cell type | Vertices | Cases |
|---|---|---|
| Line | 2 | 4 |
| Triangle | 3 | 8 |
| Pixel / Quad | 4 | 16 |
| Tetra | 4 | 16 |
| Voxel / Hex | 8 | 256 |
| Wedge | 6 | 64 |
| Pyramid | 5 | 32 |
The triangle and line tables (accessed via GetCellCase()) encode output primitives as a flat array of cell-local edge indices, padded with -1:
The polygon tables (accessed via GetCellCaseWithPolygons()) merge coplanar triangles into polygons for 3D cells, reducing the output primitive count.
In both formats, edge indices refer to the cell-local edge numbering convention as returned by GetCellEdges().
Definition at line 56 of file vtkMarchingCellsContourCases.h.
| using vtkMarchingCellsContourCases::LineCase = int[3] |
Case tables for a line cell (VTK_LINE).
Each case entry is an array of 3 ints: one edge index followed by -1, or { -1, -1 } if the cell produces no output. There are 4 cases (2^2 vertices).
Definition at line 66 of file vtkMarchingCellsContourCases.h.
| using vtkMarchingCellsContourCases::TriangleCase = int[3] |
Case tables for a triangle cell (VTK_TRIANGLE).
Each case entry is an array of 3 ints: one pair of edge indices defining a line segment, followed by -1, or { -1, -1, -1 } if no output. There are 8 cases (2^3 vertices).
Definition at line 78 of file vtkMarchingCellsContourCases.h.
| using vtkMarchingCellsContourCases::PixelCase = int[5] |
Case tables for a pixel cell (VTK_PIXEL).
Each case entry is an array of 5 ints: edge indices grouped into line segments (2 per segment), terminated by -1. There are 16 cases (2^4 vertices). Note: vtkPixel uses a different point ordering than vtkQuad (points 2 and 3 are swapped), so this table differs from QuadCases.
Definition at line 91 of file vtkMarchingCellsContourCases.h.
| using vtkMarchingCellsContourCases::QuadCase = int[5] |
Case tables for a quad cell (VTK_QUAD).
Each case entry is an array of 5 ints: edge indices grouped into line segments (2 per segment), terminated by -1. There are 16 cases (2^4 vertices).
Definition at line 102 of file vtkMarchingCellsContourCases.h.
| using vtkMarchingCellsContourCases::TetraCase = int[7] |
Case tables for a tetrahedron cell (VTK_TETRA).
Each case entry is an array of 7 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 16 cases (2^4 vertices).
Definition at line 113 of file vtkMarchingCellsContourCases.h.
| using vtkMarchingCellsContourCases::VoxelCase = int[16] |
Case tables for a voxel cell (VTK_VOXEL).
Each case entry is an array of 16 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 256 cases (2^8 vertices). Note: vtkVoxel uses a different point ordering than vtkHexahedron (points 2 and 3 are swapped, as are points 6 and 7), so this table differs from HexahedronCases.
Definition at line 127 of file vtkMarchingCellsContourCases.h.
| using vtkMarchingCellsContourCases::HexahedronCase = int[16] |
Case tables for a hexahedron cell (VTK_HEXAHEDRON).
Each case entry is an array of 16 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 256 cases (2^8 vertices).
Definition at line 138 of file vtkMarchingCellsContourCases.h.
| using vtkMarchingCellsContourCases::WedgeCase = int[13] |
Case tables for a wedge cell (VTK_WEDGE).
Each case entry is an array of 13 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 64 cases (2^6 vertices).
Definition at line 149 of file vtkMarchingCellsContourCases.h.
| using vtkMarchingCellsContourCases::PyramidCase = int[13] |
Case tables for a pyramid cell (VTK_PYRAMID).
Each case entry is an array of 13 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 32 cases (2^5 vertices).
Definition at line 160 of file vtkMarchingCellsContourCases.h.
| using vtkMarchingCellsContourCases::CellCase = const int* |
Generic interface to retrieve a contour case entry for any supported cell type.
| cellType | A VTK cell type constant (e.g. VTK_HEXAHEDRON, VTK_WEDGE). |
| caseIndex | The case index computed from the vertex inside/outside bitmask. |
Definition at line 172 of file vtkMarchingCellsContourCases.h.
| using vtkMarchingCellsContourCases::TetraCaseWithPolygons = int[6] |
Polygon case tables for a tetrahedron cell (VTK_TETRA).
Each case entry is an array of 6 ints encoding zero or one polygon in the polygon format: { nPts, e0, ..., e(nPts-1), -1 } or { -1, ... }. The maximum polygon size is a quad (nPts=4): { 4, e0, e1, e2, e3, -1 }. There are 16 cases (2^4 vertices).
Definition at line 183 of file vtkMarchingCellsContourCases.h.
| using vtkMarchingCellsContourCases::VoxelCaseWithPolygons = int[17] |
Polygon case tables for a voxel cell (VTK_VOXEL).
Each case entry is an array of 17 ints encoding zero or more polygons in the polygon format, terminated by -1. There are 256 cases (2^8 vertices). Note: vtkVoxel uses a different point ordering than vtkHexahedron (points 2 and 3 are swapped, as are points 6 and 7), so this table differs from HexahedronCasesWithPolygons.
Definition at line 197 of file vtkMarchingCellsContourCases.h.
| using vtkMarchingCellsContourCases::HexahedronCaseWithPolygons = int[17] |
Polygon case tables for a hexahedron cell (VTK_HEXAHEDRON).
Each case entry is an array of 17 ints encoding zero or more polygons in the polygon format, terminated by -1. There are 256 cases (2^8 vertices).
Definition at line 208 of file vtkMarchingCellsContourCases.h.
| using vtkMarchingCellsContourCases::WedgeCaseWithPolygons = int[10] |
Polygon case tables for a wedge cell (VTK_WEDGE).
Each case entry is an array of 10 ints encoding zero or more polygons in the polygon format, terminated by -1. The worst case is one quad and one triangle: { 4, e0..e3, 3, e4..e6, -1 }. There are 64 cases (2^6 vertices).
Definition at line 221 of file vtkMarchingCellsContourCases.h.
| using vtkMarchingCellsContourCases::PyramidCaseWithPolygons = int[9] |
Polygon case tables for a pyramid cell (VTK_PYRAMID).
Each case entry is an array of 9 ints encoding zero or more polygons in the polygon format, terminated by -1. The worst case is two triangles: { 3, e0..e2, 3, e3..e5, -1 }. There are 32 cases (2^5 vertices).
Definition at line 234 of file vtkMarchingCellsContourCases.h.
| using vtkMarchingCellsContourCases::CellCaseWithPolygons = const int* |
Generic interface to retrieve a contour case entry that generates polygons or line segments for any supported cell type.
| cellType | A VTK cell type constant (e.g. VTK_TETRA, VTK_HEXAHEDRON). |
| caseIndex | The marching case index, computed as a bitmask where bit i is set if vertex i is above the isovalue. |
Empty case (cell entirely inside or outside): [ -1, ... ]
Non-empty case — one or more output polygons/line segments: [ nPts0, e0, e1, ..., e(nPts0-1), nPts1, e0, e1, ..., e(nPts1-1), ... -1 ]
where each eN is a cell-local edge index.
Definition at line 262 of file vtkMarchingCellsContourCases.h.
| using vtkMarchingCellsContourCases::Edge = int[2] |
Returns the edge definitions for the given cell type as an array of point index pairs, where each pair defines one edge of the cell.
The array is indexed by edge id, matching the edge indices used in the case tables above. Returns nullptr if the cell type is not supported.
Definition at line 272 of file vtkMarchingCellsContourCases.h.
| using vtkMarchingCellsContourCases::EdgeArray = const Edge* |
Definition at line 273 of file vtkMarchingCellsContourCases.h.
|
static |
Case tables for a line cell (VTK_LINE).
Each case entry is an array of 3 ints: one edge index followed by -1, or { -1, -1 } if the cell produces no output. There are 4 cases (2^2 vertices).
|
static |
Case tables for a line cell (VTK_LINE).
Each case entry is an array of 3 ints: one edge index followed by -1, or { -1, -1 } if the cell produces no output. There are 4 cases (2^2 vertices).
|
static |
Case tables for a triangle cell (VTK_TRIANGLE).
Each case entry is an array of 3 ints: one pair of edge indices defining a line segment, followed by -1, or { -1, -1, -1 } if no output. There are 8 cases (2^3 vertices).
|
static |
Case tables for a triangle cell (VTK_TRIANGLE).
Each case entry is an array of 3 ints: one pair of edge indices defining a line segment, followed by -1, or { -1, -1, -1 } if no output. There are 8 cases (2^3 vertices).
|
static |
Case tables for a pixel cell (VTK_PIXEL).
Each case entry is an array of 5 ints: edge indices grouped into line segments (2 per segment), terminated by -1. There are 16 cases (2^4 vertices). Note: vtkPixel uses a different point ordering than vtkQuad (points 2 and 3 are swapped), so this table differs from QuadCases.
|
static |
Case tables for a pixel cell (VTK_PIXEL).
Each case entry is an array of 5 ints: edge indices grouped into line segments (2 per segment), terminated by -1. There are 16 cases (2^4 vertices). Note: vtkPixel uses a different point ordering than vtkQuad (points 2 and 3 are swapped), so this table differs from QuadCases.
|
static |
Case tables for a quad cell (VTK_QUAD).
Each case entry is an array of 5 ints: edge indices grouped into line segments (2 per segment), terminated by -1. There are 16 cases (2^4 vertices).
|
static |
Case tables for a quad cell (VTK_QUAD).
Each case entry is an array of 5 ints: edge indices grouped into line segments (2 per segment), terminated by -1. There are 16 cases (2^4 vertices).
|
static |
Case tables for a tetrahedron cell (VTK_TETRA).
Each case entry is an array of 7 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 16 cases (2^4 vertices).
|
static |
Case tables for a tetrahedron cell (VTK_TETRA).
Each case entry is an array of 7 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 16 cases (2^4 vertices).
|
static |
Case tables for a voxel cell (VTK_VOXEL).
Each case entry is an array of 16 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 256 cases (2^8 vertices). Note: vtkVoxel uses a different point ordering than vtkHexahedron (points 2 and 3 are swapped, as are points 6 and 7), so this table differs from HexahedronCases.
|
static |
Case tables for a voxel cell (VTK_VOXEL).
Each case entry is an array of 16 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 256 cases (2^8 vertices). Note: vtkVoxel uses a different point ordering than vtkHexahedron (points 2 and 3 are swapped, as are points 6 and 7), so this table differs from HexahedronCases.
|
static |
Case tables for a hexahedron cell (VTK_HEXAHEDRON).
Each case entry is an array of 16 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 256 cases (2^8 vertices).
|
static |
Case tables for a hexahedron cell (VTK_HEXAHEDRON).
Each case entry is an array of 16 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 256 cases (2^8 vertices).
|
static |
Case tables for a wedge cell (VTK_WEDGE).
Each case entry is an array of 13 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 64 cases (2^6 vertices).
|
static |
Case tables for a wedge cell (VTK_WEDGE).
Each case entry is an array of 13 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 64 cases (2^6 vertices).
|
static |
Case tables for a pyramid cell (VTK_PYRAMID).
Each case entry is an array of 13 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 32 cases (2^5 vertices).
|
static |
Case tables for a pyramid cell (VTK_PYRAMID).
Each case entry is an array of 13 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 32 cases (2^5 vertices).
|
static |
|
static |
Polygon case tables for a tetrahedron cell (VTK_TETRA).
Each case entry is an array of 6 ints encoding zero or one polygon in the polygon format: { nPts, e0, ..., e(nPts-1), -1 } or { -1, ... }. The maximum polygon size is a quad (nPts=4): { 4, e0, e1, e2, e3, -1 }. There are 16 cases (2^4 vertices).
|
static |
Polygon case tables for a tetrahedron cell (VTK_TETRA).
Each case entry is an array of 6 ints encoding zero or one polygon in the polygon format: { nPts, e0, ..., e(nPts-1), -1 } or { -1, ... }. The maximum polygon size is a quad (nPts=4): { 4, e0, e1, e2, e3, -1 }. There are 16 cases (2^4 vertices).
|
static |
Polygon case tables for a voxel cell (VTK_VOXEL).
Each case entry is an array of 17 ints encoding zero or more polygons in the polygon format, terminated by -1. There are 256 cases (2^8 vertices). Note: vtkVoxel uses a different point ordering than vtkHexahedron (points 2 and 3 are swapped, as are points 6 and 7), so this table differs from HexahedronCasesWithPolygons.
|
static |
Polygon case tables for a voxel cell (VTK_VOXEL).
Each case entry is an array of 17 ints encoding zero or more polygons in the polygon format, terminated by -1. There are 256 cases (2^8 vertices). Note: vtkVoxel uses a different point ordering than vtkHexahedron (points 2 and 3 are swapped, as are points 6 and 7), so this table differs from HexahedronCasesWithPolygons.
|
static |
Polygon case tables for a hexahedron cell (VTK_HEXAHEDRON).
Each case entry is an array of 17 ints encoding zero or more polygons in the polygon format, terminated by -1. There are 256 cases (2^8 vertices).
|
static |
Polygon case tables for a hexahedron cell (VTK_HEXAHEDRON).
Each case entry is an array of 17 ints encoding zero or more polygons in the polygon format, terminated by -1. There are 256 cases (2^8 vertices).
|
static |
Polygon case tables for a wedge cell (VTK_WEDGE).
Each case entry is an array of 10 ints encoding zero or more polygons in the polygon format, terminated by -1. The worst case is one quad and one triangle: { 4, e0..e3, 3, e4..e6, -1 }. There are 64 cases (2^6 vertices).
|
static |
Polygon case tables for a wedge cell (VTK_WEDGE).
Each case entry is an array of 10 ints encoding zero or more polygons in the polygon format, terminated by -1. The worst case is one quad and one triangle: { 4, e0..e3, 3, e4..e6, -1 }. There are 64 cases (2^6 vertices).
|
static |
Polygon case tables for a pyramid cell (VTK_PYRAMID).
Each case entry is an array of 9 ints encoding zero or more polygons in the polygon format, terminated by -1. The worst case is two triangles: { 3, e0..e2, 3, e3..e5, -1 }. There are 32 cases (2^5 vertices).
|
static |
Polygon case tables for a pyramid cell (VTK_PYRAMID).
Each case entry is an array of 9 ints encoding zero or more polygons in the polygon format, terminated by -1. The worst case is two triangles: { 3, e0..e2, 3, e3..e5, -1 }. There are 32 cases (2^5 vertices).
|
static |
|
static |