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
a dataset that is topologically regular with variable spacing in the three coordinate directions
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
double VolumeFractionSurfaceValueInternal
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
dynamic, self-adjusting array of double
static vtkMultiBlockDataSetAlgorithm * New()
abstract superclass for composite (multi-block or AMR) datasets
generate isosurfaces/isolines from scalar values
a simple class to control print indentation
Definition: vtkIndent.h:33
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
appends one or more polygonal datasets together
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:48
virtual vtkMTimeType GetMTime()
Return this object's modified time.
perform various plane computations
Definition: vtkPlane.h:31
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
dynamic, self-adjusting array of unsigned char
image data with blanking
vtkMultiProcessController * Controller
Store zero or more vtkInformation instances.
Extracts outer (polygonal) surface.
Generates surface of a CTH volume fraction.
Multiprocessing communication superclass.