00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00028 #ifndef __vtkExtractCTHPart_h
00029 #define __vtkExtractCTHPart_h
00030
00031 #include "vtkPolyDataAlgorithm.h"
00032 class vtkPlane;
00033 class vtkDataArray;
00034 class vtkDoubleArray;
00035 class vtkRectilinearGrid;
00036
00037 class vtkExtractCTHPartInternal;
00038 class vtkHierarchicalDataSet;
00039 class vtkPolyData;
00040 class vtkUniformGrid;
00041 class vtkImageData;
00042 class vtkDataSet;
00043
00044 class vtkContourFilter;
00045 class vtkAppendPolyData;
00046 class vtkDataSetSurfaceFilter;
00047 class vtkClipPolyData;
00048 class vtkCutter;
00049
00050 class vtkMultiProcessController;
00051
00052
00053
00054 class VTK_PARALLEL_EXPORT vtkExtractCTHPart : public vtkPolyDataAlgorithm
00055 {
00056 public:
00057 vtkTypeRevisionMacro(vtkExtractCTHPart,vtkPolyDataAlgorithm);
00058 void PrintSelf(ostream& os, vtkIndent indent);
00059
00061 static vtkInformationDoubleVectorKey *BOUNDS();
00062
00065 static vtkExtractCTHPart *New();
00066
00068
00069 void RemoveAllVolumeArrayNames();
00070 void AddVolumeArrayName(char* arrayName);
00071 int GetNumberOfVolumeArrayNames();
00072 const char* GetVolumeArrayName(int idx);
00074
00076
00077 void SetClipPlane(vtkPlane *clipPlane);
00078 vtkGetObjectMacro(ClipPlane, vtkPlane);
00080
00082 unsigned long GetMTime();
00083
00085 void SetController(vtkMultiProcessController* controller);
00086
00087
00088
00089 vtkGetObjectMacro(Controller,vtkMultiProcessController);
00090
00091 protected:
00092 vtkExtractCTHPart();
00093 ~vtkExtractCTHPart();
00094
00095 void SetOutputData(int idx, vtkPolyData* d);
00096
00097 int RequestInformation(vtkInformation *request,
00098 vtkInformationVector **inputVector,
00099 vtkInformationVector *outputVector);
00100
00101 int RequestData(vtkInformation *, vtkInformationVector **,
00102 vtkInformationVector *);
00103
00111 void ComputeBounds(vtkHierarchicalDataSet *input,
00112 int processNumber,
00113 int numProcessors);
00115
00117
00119 int GetParentProcessor(int proc);
00120 int GetLeftChildProcessor(int proc);
00122
00123 void ExecutePart(const char *arrayName,
00124 vtkHierarchicalDataSet *input,
00125 vtkAppendPolyData *appendSurface,
00126 vtkAppendPolyData *append);
00127
00128 void ExecutePartOnUniformGrid(const char *arrayName,
00129 #ifdef EXTRACT_USE_IMAGE_DATA
00130 vtkImageData *input,
00131 #else
00132 vtkUniformGrid *input,
00133 #endif
00134 vtkAppendPolyData *appendSurface,
00135 vtkAppendPolyData *append);
00136
00137 void ExecutePartOnRectilinearGrid( const char *arrayName,
00138 vtkRectilinearGrid *input,
00139 vtkAppendPolyData *appendSurface,
00140 vtkAppendPolyData *append);
00141
00142 void ExecuteCellDataToPointData(vtkDataArray *cellVolumeFraction,
00143 vtkDoubleArray *pointVolumeFraction,
00144 int *dims);
00145
00146 int FillInputPortInformation(int port,
00147 vtkInformation *info);
00148
00149 void CreateInternalPipeline();
00150 void DeleteInternalPipeline();
00151
00153
00156 int ExtractUniformGridSurface(
00157 #ifdef EXTRACT_USE_IMAGE_DATA
00158 vtkImageData *input,
00160 #else
00161 vtkUniformGrid *input,
00162 #endif
00163 vtkPolyData *output);
00164
00166
00169 int ExtractRectilinearGridSurface(vtkRectilinearGrid *input,
00170 vtkPolyData *output);
00172
00173 void ExecuteFaceQuads(vtkDataSet *input,
00174 vtkPolyData *output,
00175 int maxFlag,
00176 int originExtents[3],
00177 int ext[6],
00178 int aAxis,
00179 int bAxis,
00180 int cAxis);
00181
00183
00185 int IsGhostFace(int axis0,
00186 int maxFlag,
00187 int dims[3],
00188 vtkUnsignedCharArray *ghostArray);
00190
00191 vtkPlane *ClipPlane;
00192 vtkExtractCTHPartInternal* Internals;
00193
00194
00195 vtkDoubleArray *PointVolumeFraction;
00196
00197 #ifdef EXTRACT_USE_IMAGE_DATA
00198 vtkImageData *Data;
00199 #else
00200 vtkUniformGrid *Data;
00201 #endif
00202
00203 vtkContourFilter *Contour;
00204 vtkAppendPolyData *Append2;
00205 vtkClipPolyData *Clip1;
00206 vtkCutter *Cut;
00207 vtkClipPolyData *Clip2;
00208
00209 vtkPolyData *PolyData;
00210 vtkPolyData *RPolyData;
00211 vtkPolyData *SurfacePolyData;
00212
00213 vtkRectilinearGrid *RData;
00214 vtkContourFilter *RContour;
00215 vtkAppendPolyData *RAppend2;
00216 vtkClipPolyData *RClip1;
00217 vtkCutter *RCut;
00218 vtkClipPolyData *RClip2;
00219
00220 double Bounds[6];
00221
00222 vtkMultiProcessController *Controller;
00223 private:
00224 vtkExtractCTHPart(const vtkExtractCTHPart&);
00225 void operator=(const vtkExtractCTHPart&);
00226 };
00227 #endif