VTK
|
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 "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 //BTX 00049 enum { 00050 POLYGON = 0, 00051 SPLINE = 1, 00052 }; 00053 //ETX 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&); // Not implemented. 00110 void operator=(const vtkLassoStencilSource&); // Not implemented. 00111 }; 00112 00113 #endif