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 =========================================================================*/
43 #ifndef vtkExtractCTHPart_h
44 #define vtkExtractCTHPart_h
45 
46 #include "vtkFiltersParallelModule.h" // For export macro
48 #include "vtkSmartPointer.h" // for using smartpointer
49 
50 class vtkAppendPolyData;
51 class vtkContourFilter;
52 class vtkDataArray;
53 class vtkDataSet;
55 class vtkDoubleArray;
56 class vtkExtractCTHPartInternal;
57 class vtkImageData;
60 class vtkPlane;
61 class vtkPolyData;
62 class vtkRectilinearGrid;
63 class vtkUniformGrid;
66 class vtkExtractCTHPartFragments;
67 
68 //#define EXTRACT_USE_IMAGE_DATA 1
69 
70 class VTKFILTERSPARALLEL_EXPORT vtkExtractCTHPart : public vtkMultiBlockDataSetAlgorithm
71 {
72 public:
73  static vtkExtractCTHPart *New();
75  void PrintSelf(ostream& os, vtkIndent indent) override;
76 
78 
81  void AddVolumeArrayName(const char*);
82  void RemoveVolumeArrayNames();
83  int GetNumberOfVolumeArrayNames();
84  const char* GetVolumeArrayName(int idx);
86 
88 
93  void SetController(vtkMultiProcessController* controller);
94  vtkGetObjectMacro(Controller,vtkMultiProcessController);
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 
149  vtkMTimeType GetMTime() override;
150 
152 
156  vtkSetClampMacro(VolumeFractionSurfaceValue, double, 0.0, 1.0);
157  vtkGetMacro(VolumeFractionSurfaceValue, double);
159 
160 protected:
162  ~vtkExtractCTHPart() override;
163 
164  int FillInputPortInformation(int port, vtkInformation *info) override;
165  int RequestData(
167 
172  bool ComputeGlobalBounds(vtkCompositeDataSet *input);
173 
178  vtkSmartPointer<vtkDataSet> ExtractContour(
179  vtkCompositeDataSet* input, const char*arrayName);
180 
185  vtkSmartPointer<vtkDataSet> ExtractSolid(
186  vtkCompositeDataSet* input, const char*arrayName);
187 
188  void ExecuteFaceQuads(vtkDataSet *input,
189  vtkPolyData *output,
190  int maxFlag,
191  int originExtents[3],
192  int ext[6],
193  int aAxis,
194  int bAxis,
195  int cAxis);
196 
202  int IsGhostFace(int axis0,
203  int maxFlag,
204  int dims[3],
205  vtkUnsignedCharArray *ghostArray);
206 
207  void TriggerProgressEvent(double val);
208 
214  bool Capping;
218 private:
219  vtkExtractCTHPart(const vtkExtractCTHPart&) = delete;
220  void operator=(const vtkExtractCTHPart&) = delete;
221 
222  class VectorOfFragments;
223  class VectorOfSolids;
224 
228  inline void DetermineSurfaceValue(int dataType);
229 
234  template <class T>
235  bool ExtractClippedContourOnBlock(
236  vtkExtractCTHPart::VectorOfFragments& fragments, T* input, const char* arrayName);
237 
242  template <class T>
243  bool ExtractContourOnBlock(
244  vtkExtractCTHPart::VectorOfFragments& fragments, T* input, const char* arrayName);
245 
250  template <class T>
251  void ExtractExteriorSurface(
252  vtkExtractCTHPart::VectorOfFragments& fragments, T* input);
253 
258  template <class T>
259  bool ExtractClippedVolumeOnBlock(VectorOfSolids& solids, T* input, const char* arrayName);
260 
264  void ExecuteCellDataToPointData(
265  vtkDataArray *cellVolumeFraction, vtkDoubleArray *pointVolumeFraction, const int *dims);
266 
267  double ProgressShift;
268  double ProgressScale;
269 
270  class ScaledProgress;
271  friend class ScaledProgress;
272  vtkExtractCTHPartInternal* Internals;
273 };
274 #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:62
double VolumeFractionSurfaceValueInternal
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
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:39
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
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:54
virtual vtkMTimeType GetMTime()
Return this object&#39;s modified time.
perform various plane computations
Definition: vtkPlane.h:37
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.