00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00031 #ifndef __vtkROIStencilSource_h
00032 #define __vtkROIStencilSource_h
00033
00034
00035 #include "vtkImageStencilSource.h"
00036
00037 class VTK_IMAGING_EXPORT vtkROIStencilSource : public vtkImageStencilSource
00038 {
00039 public:
00040 static vtkROIStencilSource *New();
00041 vtkTypeMacro(vtkROIStencilSource, vtkImageStencilSource);
00042 void PrintSelf(ostream& os, vtkIndent indent);
00043
00044
00045 enum {
00046 BOX = 0,
00047 ELLIPSOID = 1,
00048 CYLINDERX = 2,
00049 CYLINDERY = 3,
00050 CYLINDERZ = 4
00051 };
00052
00053
00055
00057 vtkGetMacro(Shape, int);
00058 vtkSetClampMacro(Shape, int, BOX, CYLINDERZ);
00059 void SetShapeToBox() { this->SetShape(BOX); };
00060 void SetShapeToEllipsoid() { this->SetShape(ELLIPSOID); };
00061 void SetShapeToCylinderX() { this->SetShape(CYLINDERX); };
00062 void SetShapeToCylinderY() { this->SetShape(CYLINDERY); };
00063 void SetShapeToCylinderZ() { this->SetShape(CYLINDERZ); };
00064 virtual const char *GetShapeAsString();
00066
00068
00070 vtkGetVector6Macro(Bounds, double);
00071 vtkSetVector6Macro(Bounds, double);
00073
00074 protected:
00075 vtkROIStencilSource();
00076 ~vtkROIStencilSource();
00077
00078 virtual int RequestData(vtkInformation *, vtkInformationVector **,
00079 vtkInformationVector *);
00080
00081 int Shape;
00082 double Bounds[6];
00083
00084 private:
00085 vtkROIStencilSource(const vtkROIStencilSource&);
00086 void operator=(const vtkROIStencilSource&);
00087 };
00088
00089 #endif