VTK
|
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 "vtkImagingStencilModule.h" // For export macro 00036 #include "vtkImageStencilSource.h" 00037 00038 class VTKIMAGINGSTENCIL_EXPORT vtkROIStencilSource : public vtkImageStencilSource 00039 { 00040 public: 00041 static vtkROIStencilSource *New(); 00042 vtkTypeMacro(vtkROIStencilSource, vtkImageStencilSource); 00043 void PrintSelf(ostream& os, vtkIndent indent); 00044 00045 //BTX 00046 enum { 00047 BOX = 0, 00048 ELLIPSOID = 1, 00049 CYLINDERX = 2, 00050 CYLINDERY = 3, 00051 CYLINDERZ = 4 00052 }; 00053 //ETX 00054 00056 00058 vtkGetMacro(Shape, int); 00059 vtkSetClampMacro(Shape, int, BOX, CYLINDERZ); 00060 void SetShapeToBox() { this->SetShape(BOX); }; 00061 void SetShapeToEllipsoid() { this->SetShape(ELLIPSOID); }; 00062 void SetShapeToCylinderX() { this->SetShape(CYLINDERX); }; 00063 void SetShapeToCylinderY() { this->SetShape(CYLINDERY); }; 00064 void SetShapeToCylinderZ() { this->SetShape(CYLINDERZ); }; 00065 virtual const char *GetShapeAsString(); 00067 00069 00071 vtkGetVector6Macro(Bounds, double); 00072 vtkSetVector6Macro(Bounds, double); 00074 00075 protected: 00076 vtkROIStencilSource(); 00077 ~vtkROIStencilSource(); 00078 00079 virtual int RequestData(vtkInformation *, vtkInformationVector **, 00080 vtkInformationVector *); 00081 00082 int Shape; 00083 double Bounds[6]; 00084 00085 private: 00086 vtkROIStencilSource(const vtkROIStencilSource&); // Not implemented. 00087 void operator=(const vtkROIStencilSource&); // Not implemented. 00088 }; 00089 00090 #endif