VTK  9.3.20240424
Public Member Functions | List of all members
vtkContourHelper Class Reference

A utility class used by various contour filters. More...

#include <vtkContourHelper.h>

Public Member Functions

 vtkContourHelper (vtkIncrementalPointLocator *locator, vtkCellArray *outVerts, vtkCellArray *outLines, vtkCellArray *outPolys, vtkPointData *inPd, vtkCellData *inCd, vtkPointData *outPd, vtkCellData *outCd, int trisEstimatedSize, bool outputTriangles)
 Contour helper constructor.
 
 ~vtkContourHelper ()=default
 
void Contour (vtkCell *cell, double value, vtkDataArray *cellScalars, vtkIdType cellId)
 Generate contour for the given cell (and add it to the final result).
 

Detailed Description

A utility class used by various contour filters.

This is a simple utility class that can be used by various contour filters to produce either triangles and/or polygons based on the outputTriangles parameter. If outputTriangles is set to false, trisEstimatedSize is used to allocate memory for temporary triangles created by contouring before merging them. If outputTriangles is set to true, contouring triangles are outputted and trisEstimatedSize is not used.

When working with multidimensional dataset, it is needed to process cells from low to high dimensions.

See also
vtkContourGrid vtkCutter vtkContourFilter

Definition at line 35 of file vtkContourHelper.h.

Constructor & Destructor Documentation

◆ vtkContourHelper()

vtkContourHelper::vtkContourHelper ( vtkIncrementalPointLocator locator,
vtkCellArray outVerts,
vtkCellArray outLines,
vtkCellArray outPolys,
vtkPointData inPd,
vtkCellData inCd,
vtkPointData outPd,
vtkCellData outCd,
int  trisEstimatedSize,
bool  outputTriangles 
)

Contour helper constructor.

Parameters
locatorLocator used to "carry" and merge contour points (avoid duplicates)
outVertsContour vertices, incremented at each Contour call
outLinesContour lines, incremented at each Contour call
outPolysContour polys, incremented at each Contour call
inPdInput point data, that will be interpolated on output contour point data
inCdInput cell data, that will be copied on output contour cell data
outPdIf not nullptr, will contains contour point data, interpolated from inPd
outCdIf not nullptr, will contains contour cell data, copied from inCd
trisEstimatedSizeused to allocate memory for temporary triangles created by contouring before merging them. Only used if outputTriangles is true.
outputTrianglesif true, the contour helper will output triangles directly and will not merge them.

◆ ~vtkContourHelper()

vtkContourHelper::~vtkContourHelper ( )
default

Member Function Documentation

◆ Contour()

void vtkContourHelper::Contour ( vtkCell cell,
double  value,
vtkDataArray cellScalars,
vtkIdType  cellId 
)

Generate contour for the given cell (and add it to the final result).

Parameters
cellCell to contour
valueContour value
cellScalarsScalar values at each point to contour with. Should be indexed with local cell points ids.
cellIdContoured cell id, used to copy cell data to the contour (see inCd and outCd parameters in the constructor)
Attention
This method is not thread safe. A multi-threaded program would have to create one instance of the helper per thread, with isolated critical sections (output data pointers).

The documentation for this class was generated from the following file: