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:
70  static vtkExtractCTHPart* New();
72  void PrintSelf(ostream& os, vtkIndent indent) override;
73 
75 
78  void AddVolumeArrayName(const char*);
79  void RemoveVolumeArrayNames();
80  int GetNumberOfVolumeArrayNames();
81  const char* GetVolumeArrayName(int idx);
83 
85 
90  void SetController(vtkMultiProcessController* controller);
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 
161  int FillInputPortInformation(int port, vtkInformation* info) override;
163 
168  bool ComputeGlobalBounds(vtkCompositeDataSet* input);
169 
174  vtkSmartPointer<vtkDataSet> ExtractContour(vtkCompositeDataSet* input, const char* arrayName);
175 
180  vtkSmartPointer<vtkDataSet> ExtractSolid(vtkCompositeDataSet* input, const char* arrayName);
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:31
vtkExtractCTHPart::VolumeFractionType
int VolumeFractionType
Definition: vtkExtractCTHPart.h:194
vtkRectilinearGrid
a dataset that is topologically regular with variable spacing in the three coordinate directions
Definition: vtkRectilinearGrid.h:51
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:35
vtkUniformGrid
image data with blanking
Definition: vtkUniformGrid.h:34
vtkSmartPointer< vtkDataSet >
vtkMultiBlockDataSetAlgorithm::New
static vtkMultiBlockDataSetAlgorithm * New()
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:49
vtkExtractCTHPart::GenerateSolidGeometry
bool GenerateSolidGeometry
Definition: vtkExtractCTHPart.h:198
vtkCompositeDataSet
abstract superclass for composite (multi-block or AMR) datasets
Definition: vtkCompositeDataSet.h:45
vtkMultiBlockDataSetAlgorithm::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Definition: vtkMultiBlockDataSetAlgorithm.h:89
vtkDataSetSurfaceFilter
Extracts outer (polygonal) surface.
Definition: vtkDataSetSurfaceFilter.h:49
vtkAppendPolyData
appends one or more polygonal datasets together
Definition: vtkAppendPolyData.h:42
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkExtractCTHPart::VolumeFractionSurfaceValueInternal
double VolumeFractionSurfaceValueInternal
Definition: vtkExtractCTHPart.h:196
vtkExtractCTHPart::GenerateTriangles
bool GenerateTriangles
Definition: vtkExtractCTHPart.h:197
vtkExtractCTHPart
Generates surface of a CTH volume fraction.
Definition: vtkExtractCTHPart.h:67
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkMultiProcessController
Multiprocessing communication superclass.
Definition: vtkMultiProcessController.h:75
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:41
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkSmartPointer.h
vtkMultiBlockDataSetAlgorithm.h
vtkExtractCTHPart::RemoveGhostCells
bool RemoveGhostCells
Definition: vtkExtractCTHPart.h:200
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
vtkMultiBlockDataSetAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkExtractCTHPart::Controller
vtkMultiProcessController * Controller
Definition: vtkExtractCTHPart.h:202
vtkMultiBlockDataSetAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:35
vtkExtractCTHPart::VolumeFractionSurfaceValue
double VolumeFractionSurfaceValue
Definition: vtkExtractCTHPart.h:195
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:92
vtkExtractCTHPart::ClipPlane
vtkPlane * ClipPlane
Definition: vtkExtractCTHPart.h:201
vtkContourFilter
generate isosurfaces/isolines from scalar values
Definition: vtkContourFilter.h:64
vtkExtractCTHPart::Capping
bool Capping
Definition: vtkExtractCTHPart.h:199
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293
vtkMultiBlockDataSetAlgorithm
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
Definition: vtkMultiBlockDataSetAlgorithm.h:32