Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00032 #ifndef __vtkKWEPaintbrushShape_h
00033 #define __vtkKWEPaintbrushShape_h
00034
00035 #include "VTKEdgeConfigure.h"
00036 #include "vtkKWEPaintbrushEnums.h"
00037 #include "vtkSmartPointer.h"
00038 #include "vtkPolyData.h"
00039 #include "vtkObject.h"
00040
00041 class vtkImageStencilData;
00042 class vtkImageData;
00043 class vtkKWEPaintbrushData;
00044 class vtkPlane;
00045
00046 class VTKEdge_WIDGETS_EXPORT vtkKWEPaintbrushShape : public vtkObject
00047 {
00048 public:
00049
00051
00052 vtkTypeRevisionMacro(vtkKWEPaintbrushShape, vtkObject);
00053 void PrintSelf(ostream& os, vtkIndent indent);
00055
00057
00062 virtual vtkSmartPointer< vtkPolyData > GetShapePolyData( double *center,
00063 vtkPlane *plane = NULL) = 0;
00064
00066
00068
00069 virtual void GetStencil(vtkImageStencilData *, double p[3]) = 0;
00070 virtual void GetGrayscaleData(vtkImageData *, double p[3]) = 0;
00071 void GetPaintbrushData(vtkKWEPaintbrushData *, int x, int y, int z);
00072 void GetPaintbrushData(vtkKWEPaintbrushData *, double p[3]);
00074
00076
00078 vtkSetVector3Macro( Spacing, double );
00079 vtkGetVector3Macro( Spacing, double );
00080 vtkSetVector3Macro( Origin, double );
00081 vtkGetVector3Macro( Origin, double );
00083
00085
00087 vtkSetMacro(ScalarType,int);
00088 vtkGetMacro(ScalarType,int);
00090
00092
00095 vtkSetMacro(Polarity, int);
00096 vtkGetMacro(Polarity, int);
00097 virtual void SetPolarityToDraw();
00098 virtual void SetPolarityToErase();
00100
00101
00102
00103 enum PaintbrushResizeEnum
00104 {
00105 PaintbrushResizeUnConstrained = 0,
00106 PaintbrushResizeIsotropic,
00107 PaintbrushResizeAnisotropic,
00108 PaintbrushResize_XY,
00109 PaintbrushResize_YZ,
00110 PaintbrushResize_XZ
00111 };
00112
00113
00115
00118 vtkSetMacro( ResizeConstraint, int );
00119 vtkGetMacro( ResizeConstraint, int );
00121
00129 virtual int Resize(double factor[3], int ResizeType) = 0;
00130
00132 virtual void DeepCopy(vtkKWEPaintbrushShape *);
00133
00136 virtual void GetAnnotation(char *) = 0;
00137
00139
00140 virtual int IsInside(double vtkNotUsed(currPos)[3],
00141 double vtkNotUsed(testPos)[3]) { return 1; }
00143
00145
00146 virtual double *GetWidth() = 0;
00147 virtual void GetWidth (double &, double &, double &) = 0;
00149
00151
00153 vtkSetMacro( Representation, int );
00154 vtkGetMacro( Representation, int );
00156
00158
00159 vtkSetVector3Macro( MaxWidth, double );
00160 vtkGetVector3Macro( MaxWidth, double );
00162
00164
00167 void SetClipExtent( int e[6] );
00168 void GetClipExtent( int e[6] );
00169 int * GetClipExtent();
00171
00174 virtual void GetExtent( int extent[6], double p[3] ) = 0;
00175
00176 protected:
00177 vtkKWEPaintbrushShape();
00178 ~vtkKWEPaintbrushShape();
00179
00180 double Spacing[3];
00181 double Origin[3];
00182 int ScalarType;
00183 int Polarity;
00184 int ResizeConstraint;
00185 int Representation;
00186 double MaxWidth[3];
00187 int ClipExtent[6];
00188
00189 private:
00190 vtkKWEPaintbrushShape(const vtkKWEPaintbrushShape&);
00191 void operator=(const vtkKWEPaintbrushShape&);
00192 };
00193
00194 #endif