VTK  9.0.1
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 
47 class vtkAppendPolyData;
48 class vtkContourFilter;
49 class vtkDataArray;
50 class vtkDataSet;
52 class vtkDoubleArray;
53 class vtkExtractCTHPartInternal;
54 class vtkImageData;
57 class vtkPlane;
58 class vtkPolyData;
59 class vtkRectilinearGrid;
60 class vtkUniformGrid;
63 class vtkExtractCTHPartFragments;
64 
65 //#define EXTRACT_USE_IMAGE_DATA 1
66 
67 class VTKFILTERSPARALLEL_EXPORT vtkExtractCTHPart : public vtkMultiBlockDataSetAlgorithm
68 {
69 public:
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 
146  vtkMTimeType GetMTime() override;
147 
149 
153  vtkSetClampMacro(VolumeFractionSurfaceValue, double, 0.0, 1.0);
154  vtkGetMacro(VolumeFractionSurfaceValue, double);
156 
157 protected:
159  ~vtkExtractCTHPart() override;
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 
199  bool Capping;
203 
204 private:
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
vtkPlane
perform various plane computations
Definition: vtkPlane.h:32
vtkExtractCTHPart::ExtractSolid
vtkSmartPointer< vtkDataSet > ExtractSolid(vtkCompositeDataSet *input, const char *arrayName)
Extract solids (unstructuredGrids) for a particular array over the entire input dataset.
vtkExtractCTHPart::VolumeFractionType
int VolumeFractionType
Definition: vtkExtractCTHPart.h:194
vtkExtractCTHPart::New
static vtkExtractCTHPart * New()
vtkRectilinearGrid
a dataset that is topologically regular with variable spacing in the three coordinate directions
Definition: vtkRectilinearGrid.h:52
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:36
vtkExtractCTHPart::ExecuteFaceQuads
void ExecuteFaceQuads(vtkDataSet *input, vtkPolyData *output, int maxFlag, int originExtents[3], int ext[6], int aAxis, int bAxis, int cAxis)
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:36
vtkUniformGrid
image data with blanking
Definition: vtkUniformGrid.h:35
vtkSmartPointer< vtkDataSet >
vtkExtractCTHPart::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkExtractCTHPart::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:50
vtkExtractCTHPart::GenerateSolidGeometry
bool GenerateSolidGeometry
Definition: vtkExtractCTHPart.h:198
vtkCompositeDataSet
abstract superclass for composite (multi-block or AMR) datasets
Definition: vtkCompositeDataSet.h:46
vtkDataSetSurfaceFilter
Extracts outer (polygonal) surface.
Definition: vtkDataSetSurfaceFilter.h:50
vtkExtractCTHPart::ComputeGlobalBounds
bool ComputeGlobalBounds(vtkCompositeDataSet *input)
Compute the bounds over the composite dataset, some sub-dataset can be on other processors.
vtkAppendPolyData
appends one or more polygonal datasets together
Definition: vtkAppendPolyData.h:43
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkExtractCTHPart::VolumeFractionSurfaceValueInternal
double VolumeFractionSurfaceValueInternal
Definition: vtkExtractCTHPart.h:196
vtkExtractCTHPart::GenerateTriangles
bool GenerateTriangles
Definition: vtkExtractCTHPart.h:197
vtkExtractCTHPart::~vtkExtractCTHPart
~vtkExtractCTHPart() override
vtkExtractCTHPart::SetClipPlane
void SetClipPlane(vtkPlane *clipPlane)
Set, get or manipulate the implicit clipping plane.
vtkExtractCTHPart
Generates surface of a CTH volume fraction.
Definition: vtkExtractCTHPart.h:68
vtkMultiProcessController
Multiprocessing communication superclass.
Definition: vtkMultiProcessController.h:76
vtkExtractCTHPart::GetNumberOfVolumeArrayNames
int GetNumberOfVolumeArrayNames()
vtkExtractCTHPart::vtkExtractCTHPart
vtkExtractCTHPart()
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkSmartPointer.h
vtkExtractCTHPart::GetVolumeArrayName
const char * GetVolumeArrayName(int idx)
vtkMultiBlockDataSetAlgorithm.h
vtkExtractCTHPart::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkExtractCTHPart::SetController
void SetController(vtkMultiProcessController *controller)
Get/Set the parallel controller.
vtkExtractCTHPart::RemoveGhostCells
bool RemoveGhostCells
Definition: vtkExtractCTHPart.h:200
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:57
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:65
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkExtractCTHPart::IsGhostFace
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?
vtkExtractCTHPart::Controller
vtkMultiProcessController * Controller
Definition: vtkExtractCTHPart.h:202
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
vtkExtractCTHPart::RemoveVolumeArrayNames
void RemoveVolumeArrayNames()
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:36
vtkExtractCTHPart::VolumeFractionSurfaceValue
double VolumeFractionSurfaceValue
Definition: vtkExtractCTHPart.h:195
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:93
vtkExtractCTHPart::TriggerProgressEvent
void TriggerProgressEvent(double val)
vtkExtractCTHPart::ExtractContour
vtkSmartPointer< vtkDataSet > ExtractContour(vtkCompositeDataSet *input, const char *arrayName)
Extract contour for a particular array over the entire input dataset.
vtkExtractCTHPart::ClipPlane
vtkPlane * ClipPlane
Definition: vtkExtractCTHPart.h:201
vtkContourFilter
generate isosurfaces/isolines from scalar values
Definition: vtkContourFilter.h:65
vtkExtractCTHPart::Capping
bool Capping
Definition: vtkExtractCTHPart.h:199
vtkExtractCTHPart::AddVolumeArrayName
void AddVolumeArrayName(const char *)
Select cell-data arrays (volume-fraction arrays) to contour with.
vtkExtractCTHPart::GetMTime
vtkMTimeType GetMTime() override
Look at clip plane to compute MTime.
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293
vtkMultiBlockDataSetAlgorithm
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
Definition: vtkMultiBlockDataSetAlgorithm.h:33