VTK
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;
162  int RequestData(
164 
169  bool ComputeGlobalBounds(vtkCompositeDataSet *input);
170 
175  vtkSmartPointer<vtkDataSet> ExtractContour(
176  vtkCompositeDataSet* input, const char*arrayName);
177 
182  vtkSmartPointer<vtkDataSet> ExtractSolid(
183  vtkCompositeDataSet* input, const char*arrayName);
184 
185  void ExecuteFaceQuads(vtkDataSet *input,
186  vtkPolyData *output,
187  int maxFlag,
188  int originExtents[3],
189  int ext[6],
190  int aAxis,
191  int bAxis,
192  int cAxis);
193 
199  int IsGhostFace(int axis0,
200  int maxFlag,
201  int dims[3],
202  vtkUnsignedCharArray *ghostArray);
203 
204  void TriggerProgressEvent(double val);
205 
211  bool Capping;
215 private:
216  vtkExtractCTHPart(const vtkExtractCTHPart&) = delete;
217  void operator=(const vtkExtractCTHPart&) = delete;
218 
219  class VectorOfFragments;
220  class VectorOfSolids;
221 
225  inline void DetermineSurfaceValue(int dataType);
226 
231  template <class T>
232  bool ExtractClippedContourOnBlock(
233  vtkExtractCTHPart::VectorOfFragments& fragments, T* input, const char* arrayName);
234 
239  template <class T>
240  bool ExtractContourOnBlock(
241  vtkExtractCTHPart::VectorOfFragments& fragments, T* input, const char* arrayName);
242 
247  template <class T>
248  void ExtractExteriorSurface(
249  vtkExtractCTHPart::VectorOfFragments& fragments, T* input);
250 
255  template <class T>
256  bool ExtractClippedVolumeOnBlock(VectorOfSolids& solids, T* input, const char* arrayName);
257 
261  void ExecuteCellDataToPointData(
262  vtkDataArray *cellVolumeFraction, vtkDoubleArray *pointVolumeFraction, const int *dims);
263 
264  double ProgressShift;
265  double ProgressScale;
266 
267  class ScaledProgress;
268  friend class ScaledProgress;
269  vtkExtractCTHPartInternal* Internals;
270 };
271 #endif
vtkPlane
perform various plane computations
Definition: vtkPlane.h:31
vtkExtractCTHPart::VolumeFractionType
int VolumeFractionType
Definition: vtkExtractCTHPart.h:206
vtkRectilinearGrid
a dataset that is topologically regular with variable spacing in the three coordinate directions
Definition: vtkRectilinearGrid.h:50
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:48
vtkExtractCTHPart::GenerateSolidGeometry
bool GenerateSolidGeometry
Definition: vtkExtractCTHPart.h:210
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:88
vtkDataSetSurfaceFilter
Extracts outer (polygonal) surface.
Definition: vtkDataSetSurfaceFilter.h:49
vtkAppendPolyData
appends one or more polygonal datasets together
Definition: vtkAppendPolyData.h:42
vtkX3D::port
Definition: vtkX3D.h:447
vtkExtractCTHPart::VolumeFractionSurfaceValueInternal
double VolumeFractionSurfaceValueInternal
Definition: vtkExtractCTHPart.h:208
vtkExtractCTHPart::GenerateTriangles
bool GenerateTriangles
Definition: vtkExtractCTHPart.h:209
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:76
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkSmartPointer.h
vtkMultiBlockDataSetAlgorithm.h
vtkExtractCTHPart::RemoveGhostCells
bool RemoveGhostCells
Definition: vtkExtractCTHPart.h:212
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:80
vtkX3D::info
Definition: vtkX3D.h:376
vtkExtractCTHPart::Controller
vtkMultiProcessController * Controller
Definition: vtkExtractCTHPart.h:214
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:79
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:35
vtkExtractCTHPart::VolumeFractionSurfaceValue
double VolumeFractionSurfaceValue
Definition: vtkExtractCTHPart.h:207
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:81
vtkExtractCTHPart::ClipPlane
vtkPlane * ClipPlane
Definition: vtkExtractCTHPart.h:213
vtkContourFilter
generate isosurfaces/isolines from scalar values
Definition: vtkContourFilter.h:64
vtkExtractCTHPart::Capping
bool Capping
Definition: vtkExtractCTHPart.h:211
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
vtkMultiBlockDataSetAlgorithm
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
Definition: vtkMultiBlockDataSetAlgorithm.h:32