VTK  9.3.20240713
vtkExtractCTHPart.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
31#ifndef vtkExtractCTHPart_h
32#define vtkExtractCTHPart_h
33
34#include "vtkFiltersParallelModule.h" // For export macro
36#include "vtkSmartPointer.h" // for using smartpointer
37
38VTK_ABI_NAMESPACE_BEGIN
41class vtkDataArray;
42class vtkDataSet;
44class vtkDoubleArray;
45class vtkExtractCTHPartInternal;
46class vtkImageData;
49class vtkPlane;
50class vtkPolyData;
52class vtkUniformGrid;
55class vtkExtractCTHPartFragments;
56
57//#define EXTRACT_USE_IMAGE_DATA 1
58
59class VTKFILTERSPARALLEL_EXPORT vtkExtractCTHPart : public vtkMultiBlockDataSetAlgorithm
60{
61public:
64 void PrintSelf(ostream& os, vtkIndent indent) override;
65
67
70 void AddVolumeArrayName(const char*);
73 const char* GetVolumeArrayName(int idx);
75
77
83 vtkGetObjectMacro(Controller, vtkMultiProcessController);
85
87
90 vtkSetMacro(Capping, bool);
91 vtkGetMacro(Capping, bool);
92 vtkBooleanMacro(Capping, bool);
94
96
100 vtkSetMacro(GenerateTriangles, bool);
101 vtkGetMacro(GenerateTriangles, bool);
102 vtkBooleanMacro(GenerateTriangles, bool);
104
106
111 vtkSetMacro(GenerateSolidGeometry, bool);
112 vtkGetMacro(GenerateSolidGeometry, bool);
113 vtkBooleanMacro(GenerateSolidGeometry, bool);
115
117
122 vtkSetMacro(RemoveGhostCells, bool);
123 vtkGetMacro(RemoveGhostCells, bool);
124 vtkBooleanMacro(RemoveGhostCells, bool);
126
128
131 void SetClipPlane(vtkPlane* clipPlane);
132 vtkGetObjectMacro(ClipPlane, vtkPlane);
134
139
141
145 vtkSetClampMacro(VolumeFractionSurfaceValue, double, 0.0, 1.0);
146 vtkGetMacro(VolumeFractionSurfaceValue, double);
148
149protected:
152
153 int FillInputPortInformation(int port, vtkInformation* info) override;
155
161
167
173
174 void ExecuteFaceQuads(vtkDataSet* input, vtkPolyData* output, int maxFlag, int originExtents[6],
175 int ext[6], int aAxis, int bAxis, int cAxis);
176
182 int IsGhostFace(int axis0, int maxFlag, int dims[3], vtkUnsignedCharArray* ghostArray);
183
184 void TriggerProgressEvent(double val);
185
195
196private:
197 vtkExtractCTHPart(const vtkExtractCTHPart&) = delete;
198 void operator=(const vtkExtractCTHPart&) = delete;
199
200 class VectorOfFragments;
201 class VectorOfSolids;
202
206 inline void DetermineSurfaceValue(int dataType);
207
212 template <class T>
213 bool ExtractClippedContourOnBlock(
214 vtkExtractCTHPart::VectorOfFragments& fragments, T* input, const char* arrayName);
215
220 template <class T>
221 bool ExtractContourOnBlock(
222 vtkExtractCTHPart::VectorOfFragments& fragments, T* input, const char* arrayName);
223
228 template <class T>
229 void ExtractExteriorSurface(vtkExtractCTHPart::VectorOfFragments& fragments, T* input);
230
235 template <class T>
236 bool ExtractClippedVolumeOnBlock(VectorOfSolids& solids, T* input, const char* arrayName);
237
241 void ExecuteCellDataToPointData(
242 vtkDataArray* cellVolumeFraction, vtkDoubleArray* pointVolumeFraction, const int* dims);
243
244 double ProgressShift;
245 double ProgressScale;
246
247 class ScaledProgress;
248 friend class ScaledProgress;
249 vtkExtractCTHPartInternal* Internals;
250};
251VTK_ABI_NAMESPACE_END
252#endif
appends one or more polygonal datasets together
abstract superclass for composite (multi-block or AMR) datasets
generate isosurfaces/isolines from scalar values
abstract superclass for arrays of numeric data
Extracts outer surface (as vtkPolyData) of any dataset.
abstract class to specify dataset behavior
Definition vtkDataSet.h:166
dynamic, self-adjusting array of double
Generates surface of a CTH volume fraction.
~vtkExtractCTHPart() override
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkMultiProcessController * Controller
vtkSmartPointer< vtkDataSet > ExtractSolid(vtkCompositeDataSet *input, const char *arrayName)
Extract solids (unstructuredGrids) for a particular array over the entire input dataset.
void SetClipPlane(vtkPlane *clipPlane)
Set, get or manipulate the implicit clipping plane.
int GetNumberOfVolumeArrayNames()
Select cell-data arrays (volume-fraction arrays) to contour with.
void RemoveVolumeArrayNames()
Select cell-data arrays (volume-fraction arrays) to contour with.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
int IsGhostFace(int axis0, int maxFlag, int dims[3], vtkUnsignedCharArray *ghostArray)
Is block face on axis0 (either min or max depending on the maxFlag) composed of only ghost cells?
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMTimeType GetMTime() override
Look at clip plane to compute MTime.
void SetController(vtkMultiProcessController *controller)
Get/Set the parallel controller.
const char * GetVolumeArrayName(int idx)
Select cell-data arrays (volume-fraction arrays) to contour with.
bool ComputeGlobalBounds(vtkCompositeDataSet *input)
Compute the bounds over the composite dataset, some sub-dataset can be on other processors.
void ExecuteFaceQuads(vtkDataSet *input, vtkPolyData *output, int maxFlag, int originExtents[6], int ext[6], int aAxis, int bAxis, int cAxis)
void TriggerProgressEvent(double val)
static vtkExtractCTHPart * New()
double VolumeFractionSurfaceValueInternal
vtkSmartPointer< vtkDataSet > ExtractContour(vtkCompositeDataSet *input, const char *arrayName)
Extract contour for a particular array over the entire input dataset.
void AddVolumeArrayName(const char *)
Select cell-data arrays (volume-fraction arrays) to contour with.
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
Multiprocessing communication superclass.
perform various plane computations
Definition vtkPlane.h:135
concrete dataset represents vertices, lines, polygons, and triangle strips
a dataset that is topologically regular with variable spacing in the three coordinate directions
Hold a reference to a vtkObjectBase instance.
image data with blanking
dynamic, self-adjusting array of unsigned char
dataset represents arbitrary combinations of all possible cell types
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270