VTK  9.3.20240327
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 
38 VTK_ABI_NAMESPACE_BEGIN
39 class vtkAppendPolyData;
40 class vtkContourFilter;
41 class vtkDataArray;
42 class vtkDataSet;
44 class vtkDoubleArray;
45 class vtkExtractCTHPartInternal;
46 class vtkImageData;
49 class vtkPlane;
50 class vtkPolyData;
51 class vtkRectilinearGrid;
52 class vtkUniformGrid;
55 class vtkExtractCTHPartFragments;
56 
57 //#define EXTRACT_USE_IMAGE_DATA 1
58 
59 class VTKFILTERSPARALLEL_EXPORT vtkExtractCTHPart : public vtkMultiBlockDataSetAlgorithm
60 {
61 public:
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 
138  vtkMTimeType GetMTime() override;
139 
141 
145  vtkSetClampMacro(VolumeFractionSurfaceValue, double, 0.0, 1.0);
146  vtkGetMacro(VolumeFractionSurfaceValue, double);
148 
149 protected:
151  ~vtkExtractCTHPart() override;
152 
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 
191  bool Capping;
195 
196 private:
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 };
251 VTK_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
Definition: vtkDataArray.h:154
Extracts outer surface (as vtkPolyData) of any dataset.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:165
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
void SetClipPlane(vtkPlane *clipPlane)
Set, get or manipulate the implicit clipping plane.
int GetNumberOfVolumeArrayNames()
Select cell-data arrays (volume-fraction arrays) to contour with.
static vtkExtractCTHPart * New()
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.
vtkSmartPointer< vtkDataSet > ExtractSolid(vtkCompositeDataSet *input, const char *arrayName)
Extract solids (unstructuredGrids) for a particular array over the entire input dataset.
void SetController(vtkMultiProcessController *controller)
Get/Set the parallel controller.
bool ComputeGlobalBounds(vtkCompositeDataSet *input)
Compute the bounds over the composite dataset, some sub-dataset can be on other processors.
const char * GetVolumeArrayName(int idx)
Select cell-data arrays (volume-fraction arrays) to contour with.
void ExecuteFaceQuads(vtkDataSet *input, vtkPolyData *output, int maxFlag, int originExtents[6], int ext[6], int aAxis, int bAxis, int cAxis)
void TriggerProgressEvent(double val)
vtkSmartPointer< vtkDataSet > ExtractContour(vtkCompositeDataSet *input, const char *arrayName)
Extract contour for a particular array over the entire input dataset.
double VolumeFractionSurfaceValueInternal
void AddVolumeArrayName(const char *)
Select cell-data arrays (volume-fraction arrays) to contour with.
topologically and geometrically regular array of data
Definition: vtkImageData.h:155
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
Definition: vtkPolyData.h:180
a dataset that is topologically regular with variable spacing in the three coordinate directions
image data with blanking
dynamic, self-adjusting array of unsigned char
dataset represents arbitrary combinations of all possible cell types
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270