00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00069 #ifndef __vtkPolyDataToImageStencil_h
00070 #define __vtkPolyDataToImageStencil_h
00071
00072 #include "vtkImageStencilSource.h"
00073
00074 class vtkMergePoints;
00075 class vtkDataSet;
00076 class vtkPolyData;
00077 class vtkImageData;
00078
00079 class VTK_HYBRID_EXPORT vtkPolyDataToImageStencil :
00080 public vtkImageStencilSource
00081 {
00082 public:
00083 static vtkPolyDataToImageStencil* New();
00084 vtkTypeMacro(vtkPolyDataToImageStencil, vtkImageStencilSource);
00085 void PrintSelf(ostream& os, vtkIndent indent);
00086
00088
00089 virtual void SetInput(vtkPolyData*);
00090 vtkPolyData *GetInput();
00092
00094
00099 virtual void SetInformationInput(vtkImageData*);
00100 vtkGetObjectMacro(InformationInput, vtkImageData);
00102
00104
00107 vtkSetVector3Macro(OutputOrigin, double);
00108 vtkGetVector3Macro(OutputOrigin, double);
00110
00112
00115 vtkSetVector3Macro(OutputSpacing, double);
00116 vtkGetVector3Macro(OutputSpacing, double);
00118
00120
00124 vtkSetVector6Macro(OutputWholeExtent, int);
00125 vtkGetVector6Macro(OutputWholeExtent, int);
00127
00129
00132 vtkSetClampMacro(Tolerance, double, 0.0, 1.0);
00133 vtkGetMacro(Tolerance, double);
00135
00136 protected:
00137 vtkPolyDataToImageStencil();
00138 ~vtkPolyDataToImageStencil();
00139
00140 void ThreadedExecute(vtkImageStencilData *output,
00141 int extent[6], int threadId);
00142
00143 static void DataSetCutter(vtkDataSet *input, vtkPolyData *output,
00144 double z, vtkMergePoints *locator);
00145
00146 virtual int RequestData(vtkInformation *, vtkInformationVector **,
00147 vtkInformationVector *);
00148 virtual int RequestInformation(vtkInformation *, vtkInformationVector **,
00149 vtkInformationVector *);
00150 virtual int FillInputPortInformation(int, vtkInformation*);
00151
00153 vtkImageData *InformationInput;
00154
00156
00157 int OutputWholeExtent[6];
00158 double OutputOrigin[3];
00159 double OutputSpacing[3];
00161
00163 double Tolerance;
00164
00165 private:
00166 vtkPolyDataToImageStencil(const vtkPolyDataToImageStencil&);
00167 void operator=(const vtkPolyDataToImageStencil&);
00168 };
00169
00170 #endif