VTK  9.2.6
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=========================================================================*/
42
43#ifndef vtkExtractCTHPart_h
44#define vtkExtractCTHPart_h
45
46#include "vtkFiltersParallelModule.h" // For export macro
48#include "vtkSmartPointer.h" // for using smartpointer
49
52class vtkDataArray;
53class vtkDataSet;
55class vtkDoubleArray;
56class vtkExtractCTHPartInternal;
57class vtkImageData;
60class vtkPlane;
61class vtkPolyData;
63class vtkUniformGrid;
66class vtkExtractCTHPartFragments;
67
68//#define EXTRACT_USE_IMAGE_DATA 1
69
70class VTKFILTERSPARALLEL_EXPORT vtkExtractCTHPart : public vtkMultiBlockDataSetAlgorithm
71{
72public:
75 void PrintSelf(ostream& os, vtkIndent indent) override;
76
78
81 void AddVolumeArrayName(const char*);
84 const char* GetVolumeArrayName(int idx);
86
88
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
150
152
156 vtkSetClampMacro(VolumeFractionSurfaceValue, double, 0.0, 1.0);
157 vtkGetMacro(VolumeFractionSurfaceValue, double);
159
160protected:
163
164 int FillInputPortInformation(int port, vtkInformation* info) override;
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
206
207private:
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
Extracts outer surface (as vtkPolyData) of any dataset.
abstract class to specify dataset behavior
Definition vtkDataSet.h:63
dynamic, self-adjusting array of double
~vtkExtractCTHPart() override
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkMultiProcessController * Controller
friend class ScaledProgress
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
a simple class to control print indentation
Definition vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Multiprocessing communication superclass.
perform various plane computations
Definition vtkPlane.h:37
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:91
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
#define vtkDataArray
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287