VTK  9.1.0
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=========================================================================*/
40#ifndef vtkExtractCTHPart_h
41#define vtkExtractCTHPart_h
42
43#include "vtkFiltersParallelModule.h" // For export macro
45#include "vtkSmartPointer.h" // for using smartpointer
46
49class vtkDataArray;
50class vtkDataSet;
52class vtkDoubleArray;
53class vtkExtractCTHPartInternal;
54class vtkImageData;
57class vtkPlane;
58class vtkPolyData;
60class vtkUniformGrid;
63class vtkExtractCTHPartFragments;
64
65//#define EXTRACT_USE_IMAGE_DATA 1
66
67class VTKFILTERSPARALLEL_EXPORT vtkExtractCTHPart : public vtkMultiBlockDataSetAlgorithm
68{
69public:
72 void PrintSelf(ostream& os, vtkIndent indent) override;
73
75
78 void AddVolumeArrayName(const char*);
81 const char* GetVolumeArrayName(int idx);
83
85
91 vtkGetObjectMacro(Controller, vtkMultiProcessController);
93
95
98 vtkSetMacro(Capping, bool);
99 vtkGetMacro(Capping, bool);
100 vtkBooleanMacro(Capping, bool);
102
104
108 vtkSetMacro(GenerateTriangles, bool);
109 vtkGetMacro(GenerateTriangles, bool);
110 vtkBooleanMacro(GenerateTriangles, bool);
112
114
119 vtkSetMacro(GenerateSolidGeometry, bool);
120 vtkGetMacro(GenerateSolidGeometry, bool);
121 vtkBooleanMacro(GenerateSolidGeometry, bool);
123
125
130 vtkSetMacro(RemoveGhostCells, bool);
131 vtkGetMacro(RemoveGhostCells, bool);
132 vtkBooleanMacro(RemoveGhostCells, bool);
134
136
139 void SetClipPlane(vtkPlane* clipPlane);
140 vtkGetObjectMacro(ClipPlane, vtkPlane);
142
147
149
153 vtkSetClampMacro(VolumeFractionSurfaceValue, double, 0.0, 1.0);
154 vtkGetMacro(VolumeFractionSurfaceValue, double);
156
157protected:
160
163
169
175
181
182 void ExecuteFaceQuads(vtkDataSet* input, vtkPolyData* output, int maxFlag, int originExtents[3],
183 int ext[6], int aAxis, int bAxis, int cAxis);
184
190 int IsGhostFace(int axis0, int maxFlag, int dims[3], vtkUnsignedCharArray* ghostArray);
191
192 void TriggerProgressEvent(double val);
193
203
204private:
205 vtkExtractCTHPart(const vtkExtractCTHPart&) = delete;
206 void operator=(const vtkExtractCTHPart&) = delete;
207
208 class VectorOfFragments;
209 class VectorOfSolids;
210
214 inline void DetermineSurfaceValue(int dataType);
215
220 template <class T>
221 bool ExtractClippedContourOnBlock(
222 vtkExtractCTHPart::VectorOfFragments& fragments, T* input, const char* arrayName);
223
228 template <class T>
229 bool ExtractContourOnBlock(
230 vtkExtractCTHPart::VectorOfFragments& fragments, T* input, const char* arrayName);
231
236 template <class T>
237 void ExtractExteriorSurface(vtkExtractCTHPart::VectorOfFragments& fragments, T* input);
238
243 template <class T>
244 bool ExtractClippedVolumeOnBlock(VectorOfSolids& solids, T* input, const char* arrayName);
245
249 void ExecuteCellDataToPointData(
250 vtkDataArray* cellVolumeFraction, vtkDoubleArray* pointVolumeFraction, const int* dims);
251
252 double ProgressShift;
253 double ProgressScale;
254
255 class ScaledProgress;
256 friend class ScaledProgress;
257 vtkExtractCTHPartInternal* Internals;
258};
259#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:159
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 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.
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 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
Definition: vtkImageData.h:157
a simple class to control print indentation
Definition: vtkIndent.h:113
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:143
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
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