VTK
dox/Imaging/Stencil/vtkLassoStencilSource.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkLassoStencilSource.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00031 #ifndef __vtkLassoStencilSource_h
00032 #define __vtkLassoStencilSource_h
00033 
00034 
00035 #include "vtkImagingStencilModule.h" // For export macro
00036 #include "vtkImageStencilSource.h"
00037 
00038 class vtkPoints;
00039 class vtkSpline;
00040 class vtkLSSPointMap;
00041 
00042 class VTKIMAGINGSTENCIL_EXPORT vtkLassoStencilSource : public vtkImageStencilSource
00043 {
00044 public:
00045   static vtkLassoStencilSource *New();
00046   vtkTypeMacro(vtkLassoStencilSource, vtkImageStencilSource);
00047   void PrintSelf(ostream& os, vtkIndent indent);
00048 
00049 //BTX
00050   enum {
00051     POLYGON = 0,
00052     SPLINE = 1
00053   };
00054 //ETX
00055 
00057 
00059   vtkGetMacro(Shape, int);
00060   vtkSetClampMacro(Shape, int, POLYGON, SPLINE);
00061   void SetShapeToPolygon() { this->SetShape(POLYGON); };
00062   void SetShapeToSpline() { this->SetShape(SPLINE); };
00063   virtual const char *GetShapeAsString();
00065 
00067 
00070   virtual void SetPoints(vtkPoints *points);
00071   vtkGetObjectMacro(Points, vtkPoints);
00073 
00075 
00077   vtkGetMacro(SliceOrientation, int);
00078   vtkSetClampMacro(SliceOrientation, int, 0, 2);
00080 
00082 
00085   virtual void SetSlicePoints(int i, vtkPoints *points);
00086   virtual vtkPoints *GetSlicePoints(int i);
00088 
00090   virtual void RemoveAllSlicePoints();
00091 
00093   unsigned long GetMTime();
00094 
00095 protected:
00096   vtkLassoStencilSource();
00097   ~vtkLassoStencilSource();
00098 
00099   virtual int RequestData(vtkInformation *, vtkInformationVector **,
00100                           vtkInformationVector *);
00101 
00102   int Shape;
00103   int SliceOrientation;
00104   vtkPoints *Points;
00105   vtkSpline *SplineX;
00106   vtkSpline *SplineY;
00107   vtkLSSPointMap *PointMap;
00108 
00109 private:
00110   vtkLassoStencilSource(const vtkLassoStencilSource&);  // Not implemented.
00111   void operator=(const vtkLassoStencilSource&);  // Not implemented.
00112 };
00113 
00114 #endif