VTK  9.2.5
vtkExtractCTHPart.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkExtractCTHPart.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
43 #ifndef vtkExtractCTHPart_h
44 #define vtkExtractCTHPart_h
45 
46 #include "vtkFiltersParallelModule.h" // For export macro
48 #include "vtkSmartPointer.h" // for using smartpointer
49 
50 class vtkAppendPolyData;
51 class vtkContourFilter;
52 class vtkDataArray;
53 class vtkDataSet;
55 class vtkDoubleArray;
56 class vtkExtractCTHPartInternal;
57 class vtkImageData;
60 class vtkPlane;
61 class vtkPolyData;
62 class vtkRectilinearGrid;
63 class vtkUniformGrid;
66 class vtkExtractCTHPartFragments;
67 
68 //#define EXTRACT_USE_IMAGE_DATA 1
69 
70 class VTKFILTERSPARALLEL_EXPORT vtkExtractCTHPart : public vtkMultiBlockDataSetAlgorithm
71 {
72 public:
75  void PrintSelf(ostream& os, vtkIndent indent) override;
76 
78 
81  void AddVolumeArrayName(const char*);
84  const char* GetVolumeArrayName(int idx);
86 
88 
94  vtkGetObjectMacro(Controller, vtkMultiProcessController);
96 
98 
101  vtkSetMacro(Capping, bool);
102  vtkGetMacro(Capping, bool);
103  vtkBooleanMacro(Capping, bool);
105 
107 
111  vtkSetMacro(GenerateTriangles, bool);
112  vtkGetMacro(GenerateTriangles, bool);
113  vtkBooleanMacro(GenerateTriangles, bool);
115 
117 
122  vtkSetMacro(GenerateSolidGeometry, bool);
123  vtkGetMacro(GenerateSolidGeometry, bool);
124  vtkBooleanMacro(GenerateSolidGeometry, bool);
126 
128 
133  vtkSetMacro(RemoveGhostCells, bool);
134  vtkGetMacro(RemoveGhostCells, bool);
135  vtkBooleanMacro(RemoveGhostCells, bool);
137 
139 
142  void SetClipPlane(vtkPlane* clipPlane);
143  vtkGetObjectMacro(ClipPlane, vtkPlane);
145 
149  vtkMTimeType GetMTime() override;
150 
152 
156  vtkSetClampMacro(VolumeFractionSurfaceValue, double, 0.0, 1.0);
157  vtkGetMacro(VolumeFractionSurfaceValue, double);
159 
160 protected:
162  ~vtkExtractCTHPart() override;
163 
166 
172 
178 
184 
185  void ExecuteFaceQuads(vtkDataSet* input, vtkPolyData* output, int maxFlag, int originExtents[3],
186  int ext[6], int aAxis, int bAxis, int cAxis);
187 
193  int IsGhostFace(int axis0, int maxFlag, int dims[3], vtkUnsignedCharArray* ghostArray);
194 
195  void TriggerProgressEvent(double val);
196 
202  bool Capping;
206 
207 private:
208  vtkExtractCTHPart(const vtkExtractCTHPart&) = delete;
209  void operator=(const vtkExtractCTHPart&) = delete;
210 
211  class VectorOfFragments;
212  class VectorOfSolids;
213 
217  inline void DetermineSurfaceValue(int dataType);
218 
223  template <class T>
224  bool ExtractClippedContourOnBlock(
225  vtkExtractCTHPart::VectorOfFragments& fragments, T* input, const char* arrayName);
226 
231  template <class T>
232  bool ExtractContourOnBlock(
233  vtkExtractCTHPart::VectorOfFragments& fragments, T* input, const char* arrayName);
234 
239  template <class T>
240  void ExtractExteriorSurface(vtkExtractCTHPart::VectorOfFragments& fragments, T* input);
241 
246  template <class T>
247  bool ExtractClippedVolumeOnBlock(VectorOfSolids& solids, T* input, const char* arrayName);
248 
252  void ExecuteCellDataToPointData(
253  vtkDataArray* cellVolumeFraction, vtkDoubleArray* pointVolumeFraction, const int* dims);
254 
255  double ProgressShift;
256  double ProgressScale;
257 
258  class ScaledProgress;
259  friend class ScaledProgress;
260  vtkExtractCTHPartInternal* Internals;
261 };
262 #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:165
Extracts outer surface (as vtkPolyData) of any dataset.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:172
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 ExecuteFaceQuads(vtkDataSet *input, vtkPolyData *output, int maxFlag, int originExtents[3], int ext[6], int aAxis, int bAxis, int cAxis)
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 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:163
a simple class to control print indentation
Definition: vtkIndent.h:119
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:146
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:200
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:382
@ port
Definition: vtkX3D.h:453
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287