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 
46 class vtkAppendPolyData;
47 class vtkContourFilter;
48 class vtkDataArray;
49 class vtkDataSet;
51 class vtkDoubleArray;
52 class vtkExtractCTHPartInternal;
53 class vtkImageData;
56 class vtkPlane;
57 class vtkPolyData;
58 class vtkRectilinearGrid;
59 class vtkUniformGrid;
61 class vtkExtractCTHPartFragments;
62 
63 //#define EXTRACT_USE_IMAGE_DATA 1
64 
65 class VTKFILTERSPARALLEL_EXPORT vtkExtractCTHPart : public vtkMultiBlockDataSetAlgorithm
66 {
67 public:
68  static vtkExtractCTHPart *New();
70  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
71 
73 
76  void AddVolumeArrayName(const char*);
77  void RemoveVolumeArrayNames();
78  int GetNumberOfVolumeArrayNames();
79  const char* GetVolumeArrayName(int idx);
81 
83 
88  void SetController(vtkMultiProcessController* controller);
89  vtkGetObjectMacro(Controller,vtkMultiProcessController);
91 
93 
96  vtkSetMacro(Capping, bool);
97  vtkGetMacro(Capping, bool);
98  vtkBooleanMacro(Capping, bool);
100 
102 
106  vtkSetMacro(GenerateTriangles, bool);
107  vtkGetMacro(GenerateTriangles, bool);
108  vtkBooleanMacro(GenerateTriangles, bool);
110 
112 
117  vtkSetMacro(RemoveGhostCells, bool);
118  vtkGetMacro(RemoveGhostCells, bool);
119  vtkBooleanMacro(RemoveGhostCells, bool);
121 
123 
126  void SetClipPlane(vtkPlane *clipPlane);
127  vtkGetObjectMacro(ClipPlane, vtkPlane);
129 
133  vtkMTimeType GetMTime() VTK_OVERRIDE;
134 
136 
140  vtkSetClampMacro(VolumeFractionSurfaceValue, double, 0.0, 1.0);
141  vtkGetMacro(VolumeFractionSurfaceValue, double);
143 
144 protected:
146  ~vtkExtractCTHPart() VTK_OVERRIDE;
147 
148  int FillInputPortInformation(int port, vtkInformation *info) VTK_OVERRIDE;
149  int RequestData(
150  vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
151 
156  bool ComputeGlobalBounds(vtkCompositeDataSet *input);
157 
162  bool ExtractContour(
163  vtkPolyData* output, vtkCompositeDataSet* input, const char*arrayName);
164 
165  void ExecuteFaceQuads(vtkDataSet *input,
166  vtkPolyData *output,
167  int maxFlag,
168  int originExtents[3],
169  int ext[6],
170  int aAxis,
171  int bAxis,
172  int cAxis);
173 
179  int IsGhostFace(int axis0,
180  int maxFlag,
181  int dims[3],
182  vtkUnsignedCharArray *ghostArray);
183 
184  void TriggerProgressEvent(double val);
185 
186  int VolumeFractionType;
187  double VolumeFractionSurfaceValue;
188  double VolumeFractionSurfaceValueInternal;
189  bool GenerateTriangles;
190  bool Capping;
191  bool RemoveGhostCells;
192  vtkPlane *ClipPlane;
194 private:
195  vtkExtractCTHPart(const vtkExtractCTHPart&) VTK_DELETE_FUNCTION;
196  void operator=(const vtkExtractCTHPart&) VTK_DELETE_FUNCTION;
197 
198  class VectorOfFragments;
199 
204  template <class T>
205  bool ExtractClippedContourOnBlock(
206  vtkExtractCTHPart::VectorOfFragments& fragments, T* input, const char* arrayName);
207 
212  template <class T>
213  bool ExtractContourOnBlock(
214  vtkExtractCTHPart::VectorOfFragments& fragments, T* input, const char* arrayName);
215 
220  template <class T>
221  void ExtractExteriorSurface(
222  vtkExtractCTHPart::VectorOfFragments& fragments, T* input);
223 
227  void ExecuteCellDataToPointData(
228  vtkDataArray *cellVolumeFraction, vtkDoubleArray *pointVolumeFraction, const int *dims);
229 
230  double ProgressShift;
231  double ProgressScale;
232 
233  class ScaledProgress;
234  friend class ScaledProgress;
235  vtkExtractCTHPartInternal* Internals;
236 };
237 #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:300
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
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
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:48
virtual vtkMTimeType GetMTime()
Return this object&#39;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.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
dynamic, self-adjusting array of unsigned char
image data with blanking
Store zero or more vtkInformation instances.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Extracts outer (polygonal) surface.
Generates surface of a CTH volume fraction.
Multiprocessing communication superclass.