VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 =========================================================================*/
28 #ifndef __vtkExtractCTHPart_h
29 #define __vtkExtractCTHPart_h
30 
31 #include "vtkFiltersParallelModule.h" // For export macro
33 
34 class vtkAppendPolyData;
35 class vtkBoundingBox;
36 class vtkClipPolyData;
37 class vtkContourFilter;
38 class vtkCutter;
39 class vtkDataArray;
40 class vtkDataSet;
42 class vtkDoubleArray;
43 class vtkExtractCTHPartInternal;
44 class vtkImageData;
45 class vtkInformationDoubleVectorKey;
47 class vtkMultiProcessController;
48 class vtkPlane;
49 class vtkPolyData;
50 class vtkRectilinearGrid;
51 class vtkUniformGrid;
52 class vtkUnsignedCharArray;
53 
54 //#define EXTRACT_USE_IMAGE_DATA 1
55 
56 class VTKFILTERSPARALLEL_EXPORT vtkExtractCTHPart : public vtkMultiBlockDataSetAlgorithm
57 {
58 public:
60  void PrintSelf(ostream& os, vtkIndent indent);
61 
64  static vtkExtractCTHPart *New();
65 
67 
68  void RemoveDoubleVolumeArrayNames();
69  void RemoveFloatVolumeArrayNames();
70  void RemoveUnsignedCharVolumeArrayNames();
71  int GetNumberOfVolumeArrayNames();
72  const char* GetVolumeArrayName(int idx);
73  // for backwards compatibility
74  void RemoveAllVolumeArrayNames();
76 
78 
82  void AddDoubleVolumeArrayName(char* arrayName);
83  void AddFloatVolumeArrayName(char* arrayName);
84  void AddUnsignedCharVolumeArrayName(char* arrayName);
85  //for backwards compatibility
86  void AddVolumeArrayName(char* arrayName);
88 
90 
91  void SetClipPlane(vtkPlane *clipPlane);
92  vtkGetObjectMacro(ClipPlane, vtkPlane);
94 
96  unsigned long GetMTime();
97 
99  void SetController(vtkMultiProcessController* controller);
100 
102 
104  vtkGetObjectMacro(Controller,vtkMultiProcessController);
106 
108 
110  vtkSetClampMacro(VolumeFractionSurfaceValue, double, 0.0, 1.0);
111  vtkGetMacro(VolumeFractionSurfaceValue, double);
113 
114 protected:
117 
118  virtual int RequestInformation(vtkInformation *request,
119  vtkInformationVector **inputVector,
120  vtkInformationVector *outputVector);
121 
122  virtual int RequestData(vtkInformation *, vtkInformationVector **,
123  vtkInformationVector *);
124 
132  void ComputeBounds(vtkCompositeDataSet *input,
133  int processNumber,
134  int numProcessors);
136 
137  void ExecutePart(const char *arrayName,
138  vtkCompositeDataSet *input,
139  vtkAppendPolyData *appendSurface,
140  vtkAppendPolyData *append,
141  float minProgress,
142  float maxProgress);
143 
144  void ExecutePartOnUniformGrid(const char *arrayName,
145 #ifdef EXTRACT_USE_IMAGE_DATA
146  vtkImageData *input,
147 #else
148  vtkUniformGrid *input,
149 #endif
150  vtkAppendPolyData *appendSurface,
151  vtkAppendPolyData *append,
152  float minProgress,
153  float maxProgress);
154 
155  void ExecutePartOnRectilinearGrid(const char *arrayName,
156  vtkRectilinearGrid *input,
157  vtkAppendPolyData *appendSurface,
158  vtkAppendPolyData *append,
159  float minProgress,
160  float maxProgress);
161 
162  void ExecuteCellDataToPointData(vtkDataArray *cellVolumeFraction,
163  vtkDoubleArray *pointVolumeFraction,
164  int *dims,
165  float minProgress,
166  float maxProgress,
167  int reportProgress);
168 
169  virtual int FillInputPortInformation(int port,
170  vtkInformation *info);
171 
172  void CreateInternalPipeline();
173  void DeleteInternalPipeline();
174 
176 
179  int ExtractUniformGridSurface(
180 #ifdef EXTRACT_USE_IMAGE_DATA
181  vtkImageData *input,
182 #else
183  vtkUniformGrid *input,
184 #endif
185  vtkPolyData *output);
187 
189 
192  int ExtractRectilinearGridSurface(vtkRectilinearGrid *input,
193  vtkPolyData *output);
195 
196  void ExecuteFaceQuads(vtkDataSet *input,
197  vtkPolyData *output,
198  int maxFlag,
199  int originExtents[3],
200  int ext[6],
201  int aAxis,
202  int bAxis,
203  int cAxis);
204 
206 
208  int IsGhostFace(int axis0,
209  int maxFlag,
210  int dims[3],
211  vtkUnsignedCharArray *ghostArray);
213 
214  vtkPlane *ClipPlane;
215  vtkExtractCTHPartInternal* Internals;
216 
217  // Internal Pipeline elements
218  vtkDoubleArray *PointVolumeFraction;
219 
220 #ifdef EXTRACT_USE_IMAGE_DATA
221  vtkImageData *Data;
222 #else
224 #endif
225 
231 
237 
244 
245  void EvaluateVolumeFractionType(vtkRectilinearGrid* rg,
246  vtkCompositeDataSet* input);
251 
252  vtkBoundingBox *Bounds; // Whole bounds (dataset over all the processors)
253 
254  vtkMultiProcessController *Controller;
255 private:
256  vtkExtractCTHPart(const vtkExtractCTHPart&); // Not implemented.
257  void operator=(const vtkExtractCTHPart&); // Not implemented.
258 };
259 #endif
vtkClipPolyData * RClip1
vtkUniformGrid * Data
Cut vtkDataSet with user-specified implicit function.
Definition: vtkCutter.h:68
a dataset that is topologically regular with variable spacing in the three coordinate directions ...
vtkPolyData * PolyData
vtkAlgorithm * PolyDataProducer
vtkAppendPolyData * Append2
vtkRectilinearGrid * RData
double VolumeFractionSurfaceValueInternal
vtkClipPolyData * Clip1
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:82
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkContourFilter * RContour
static vtkMultiBlockDataSetAlgorithm * New()
vtkDoubleArray * PointVolumeFraction
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:60
abstract superclass for composite (multi-block or AMR) datasets
vtkAlgorithm * RPolyDataProducer
generate isosurfaces/isolines from scalar values
vtkAppendPolyData * RAppend2
appends one or more polygonal datasets together
vtkContourFilter * Contour
clip polygonal data with user-specified implicit function or input scalar data
vtkBoundingBox * Bounds
image data with blanking
vtkClipPolyData * RClip2
vtkMultiProcessController * Controller
virtual int FillInputPortInformation(int port, vtkInformation *info)
void PrintSelf(ostream &os, vtkIndent indent)
vtkPolyData * SurfacePolyData
vtkExtractCTHPartInternal * Internals
Extracts outer (polygonal) surface.
vtkClipPolyData * Clip2
Fast Simple Class for dealing with 3D bounds.
Generates surface of an CTH volume fraction.
vtkPolyData * RPolyData
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)