VTK
dox/Imaging/vtkROIStencilSource.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkROIStencilSource.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 __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 //BTX
00045   enum {
00046     BOX = 0,
00047     ELLIPSOID = 1,
00048     CYLINDERX = 2,
00049     CYLINDERY = 3,
00050     CYLINDERZ = 4
00051   };
00052 //ETX
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&);  // Not implemented.
00086   void operator=(const vtkROIStencilSource&);  // Not implemented.
00087 };
00088 
00089 #endif