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 =========================================================================*/
42 #ifndef vtkExtractCTHPart_h
43 #define vtkExtractCTHPart_h
44 
45 #include "vtkFiltersParallelModule.h" // For export macro
47 
48 class vtkAppendPolyData;
49 class vtkContourFilter;
50 class vtkDataArray;
51 class vtkDataSet;
53 class vtkDoubleArray;
54 class vtkExtractCTHPartInternal;
55 class vtkImageData;
58 class vtkPlane;
59 class vtkPolyData;
60 class vtkRectilinearGrid;
61 class vtkUniformGrid;
63 class vtkExtractCTHPartFragments;
64 
65 //#define EXTRACT_USE_IMAGE_DATA 1
66 
68 {
69 public:
70  static vtkExtractCTHPart *New();
72  void PrintSelf(ostream& os, vtkIndent indent);
73 
75 
76  void AddVolumeArrayName(const char*);
77  void RemoveVolumeArrayNames();
78  int GetNumberOfVolumeArrayNames();
79  const char* GetVolumeArrayName(int idx);
81 
83 
86  void SetController(vtkMultiProcessController* controller);
87  vtkGetObjectMacro(Controller,vtkMultiProcessController);
89 
91 
92  vtkSetMacro(Capping, bool);
93  vtkGetMacro(Capping, bool);
94  vtkBooleanMacro(Capping, bool);
96 
98 
101  vtkSetMacro(GenerateTriangles, bool);
102  vtkGetMacro(GenerateTriangles, bool);
103  vtkBooleanMacro(GenerateTriangles, bool);
105 
107 
110  vtkSetMacro(RemoveGhostCells, bool);
111  vtkGetMacro(RemoveGhostCells, bool);
112  vtkBooleanMacro(RemoveGhostCells, bool);
114 
116 
117  void SetClipPlane(vtkPlane *clipPlane);
118  vtkGetObjectMacro(ClipPlane, vtkPlane);
120 
122  unsigned long GetMTime();
123 
125 
127  vtkSetClampMacro(VolumeFractionSurfaceValue, double, 0.0, 1.0);
128  vtkGetMacro(VolumeFractionSurfaceValue, double);
130 
131 protected:
134 
136  virtual int RequestData(
138 
141  bool ComputeGlobalBounds(vtkCompositeDataSet *input);
142 
144 
146  bool ExtractContour(
147  vtkPolyData* output, vtkCompositeDataSet* input, const char*arrayName);
149 
150  void ExecuteFaceQuads(vtkDataSet *input,
151  vtkPolyData *output,
152  int maxFlag,
153  int originExtents[3],
154  int ext[6],
155  int aAxis,
156  int bAxis,
157  int cAxis);
158 
160 
162  int IsGhostFace(int axis0,
163  int maxFlag,
164  int dims[3],
165  vtkUnsignedCharArray *ghostArray);
167 
168  void TriggerProgressEvent(double val);
169 
174  bool Capping;
178 private:
179  vtkExtractCTHPart(const vtkExtractCTHPart&); // Not implemented.
180  void operator=(const vtkExtractCTHPart&); // Not implemented.
181 
182  class VectorOfFragments;
183 
185 
187  template <class T>
188  bool ExtractClippedContourOnBlock(
189  vtkExtractCTHPart::VectorOfFragments& fragments, T* input, const char* arrayName);
191 
193 
195  template <class T>
196  bool ExtractContourOnBlock(
197  vtkExtractCTHPart::VectorOfFragments& fragments, T* input, const char* arrayName);
199 
201 
203  template <class T>
204  void ExtractExteriorSurface(
205  vtkExtractCTHPart::VectorOfFragments& fragments, T* input);
207 
209 
210  void ExecuteCellDataToPointData(
211  vtkDataArray *cellVolumeFraction, vtkDoubleArray *pointVolumeFraction, const int *dims);
213 
214  double ProgressShift;
215  double ProgressScale;
216 
217  class ScaledProgress;
218  friend class ScaledProgress;
219  vtkExtractCTHPartInternal* Internals;
220 };
221 #endif
a dataset that is topologically regular with variable spacing in the three coordinate directions ...
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:61
double VolumeFractionSurfaceValueInternal
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
dynamic, self-adjusting array of double
#define VTKFILTERSPARALLEL_EXPORT
static vtkMultiBlockDataSetAlgorithm * New()
abstract superclass for composite (multi-block or AMR) datasets
generate isosurfaces/isolines from scalar values
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:38
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
appends one or more polygonal datasets together
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
perform various plane computations
Definition: vtkPlane.h:36
dynamic, self-adjusting array of unsigned char
image data with blanking
vtkMultiProcessController * Controller
virtual int FillInputPortInformation(int port, vtkInformation *info)
void PrintSelf(ostream &os, vtkIndent indent)
Store zero or more vtkInformation instances.
Extracts outer (polygonal) surface.
Generates surface of a CTH volume fraction.
Multiprocessing communication superclass.