00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00031 #ifndef __vtkLassoStencilSource_h
00032 #define __vtkLassoStencilSource_h
00033
00034
00035 #include "vtkImageStencilSource.h"
00036
00037 class vtkPoints;
00038 class vtkSpline;
00039 class vtkLSSPointMap;
00040
00041 class VTK_IMAGING_EXPORT vtkLassoStencilSource : public vtkImageStencilSource
00042 {
00043 public:
00044 static vtkLassoStencilSource *New();
00045 vtkTypeMacro(vtkLassoStencilSource, vtkImageStencilSource);
00046 void PrintSelf(ostream& os, vtkIndent indent);
00047
00048
00049 enum {
00050 POLYGON = 0,
00051 SPLINE = 1,
00052 };
00053
00054
00056
00058 vtkGetMacro(Shape, int);
00059 vtkSetClampMacro(Shape, int, POLYGON, SPLINE);
00060 void SetShapeToPolygon() { this->SetShape(POLYGON); };
00061 void SetShapeToSpline() { this->SetShape(SPLINE); };
00062 virtual const char *GetShapeAsString();
00064
00066
00069 virtual void SetPoints(vtkPoints *points);
00070 vtkGetObjectMacro(Points, vtkPoints);
00072
00074
00076 vtkGetMacro(SliceOrientation, int);
00077 vtkSetClampMacro(SliceOrientation, int, 0, 2);
00079
00081
00084 virtual void SetSlicePoints(int i, vtkPoints *points);
00085 virtual vtkPoints *GetSlicePoints(int i);
00087
00089 virtual void RemoveAllSlicePoints();
00090
00092 unsigned long GetMTime();
00093
00094 protected:
00095 vtkLassoStencilSource();
00096 ~vtkLassoStencilSource();
00097
00098 virtual int RequestData(vtkInformation *, vtkInformationVector **,
00099 vtkInformationVector *);
00100
00101 int Shape;
00102 int SliceOrientation;
00103 vtkPoints *Points;
00104 vtkSpline *SplineX;
00105 vtkSpline *SplineY;
00106 vtkLSSPointMap *PointMap;
00107
00108 private:
00109 vtkLassoStencilSource(const vtkLassoStencilSource&);
00110 void operator=(const vtkLassoStencilSource&);
00111 };
00112
00113 #endif