VTK
vtkROIStencilSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkROIStencilSource.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
29 #ifndef vtkROIStencilSource_h
30 #define vtkROIStencilSource_h
31 
32 
33 #include "vtkImagingStencilModule.h" // For export macro
34 #include "vtkImageStencilSource.h"
35 
36 class VTKIMAGINGSTENCIL_EXPORT vtkROIStencilSource : public vtkImageStencilSource
37 {
38 public:
39  static vtkROIStencilSource *New();
41  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
42 
43  enum {
44  BOX = 0,
45  ELLIPSOID = 1,
46  CYLINDERX = 2,
47  CYLINDERY = 3,
48  CYLINDERZ = 4
49  };
50 
52 
56  vtkGetMacro(Shape, int);
57  vtkSetClampMacro(Shape, int, BOX, CYLINDERZ);
58  void SetShapeToBox() { this->SetShape(BOX); };
59  void SetShapeToEllipsoid() { this->SetShape(ELLIPSOID); };
60  void SetShapeToCylinderX() { this->SetShape(CYLINDERX); };
61  void SetShapeToCylinderY() { this->SetShape(CYLINDERY); };
62  void SetShapeToCylinderZ() { this->SetShape(CYLINDERZ); };
63  virtual const char *GetShapeAsString();
65 
67 
71  vtkGetVector6Macro(Bounds, double);
72  vtkSetVector6Macro(Bounds, double);
74 
75 protected:
77  ~vtkROIStencilSource() VTK_OVERRIDE;
78 
79  int RequestData(vtkInformation *, vtkInformationVector **,
80  vtkInformationVector *) VTK_OVERRIDE;
81 
82  int Shape;
83  double Bounds[6];
84 
85 private:
86  vtkROIStencilSource(const vtkROIStencilSource&) VTK_DELETE_FUNCTION;
87  void operator=(const vtkROIStencilSource&) VTK_DELETE_FUNCTION;
88 };
89 
90 #endif
Store vtkAlgorithm input/output information.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkImageStencilSource * New()
void SetShapeToBox()
The shape of the region of interest.
create simple mask shapes
void SetShapeToCylinderZ()
The shape of the region of interest.
a simple class to control print indentation
Definition: vtkIndent.h:33
void SetShapeToCylinderX()
The shape of the region of interest.
void SetShapeToEllipsoid()
The shape of the region of interest.
Store zero or more vtkInformation instances.
generate an image stencil
void SetShapeToCylinderY()
The shape of the region of interest.