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 =========================================================================*/
35 #ifndef vtkROIStencilSource_h
36 #define vtkROIStencilSource_h
37 
38 
39 #include "vtkImagingStencilModule.h" // For export macro
40 #include "vtkImageStencilSource.h"
41 
42 class VTKIMAGINGSTENCIL_EXPORT vtkROIStencilSource : public vtkImageStencilSource
43 {
44 public:
45  static vtkROIStencilSource *New();
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
49  enum {
50  BOX = 0,
51  ELLIPSOID = 1,
52  CYLINDERX = 2,
53  CYLINDERY = 3,
54  CYLINDERZ = 4
55  };
56 
58 
62  vtkGetMacro(Shape, int);
63  vtkSetClampMacro(Shape, int, BOX, CYLINDERZ);
64  void SetShapeToBox() { this->SetShape(BOX); };
65  void SetShapeToEllipsoid() { this->SetShape(ELLIPSOID); };
66  void SetShapeToCylinderX() { this->SetShape(CYLINDERX); };
67  void SetShapeToCylinderY() { this->SetShape(CYLINDERY); };
68  void SetShapeToCylinderZ() { this->SetShape(CYLINDERZ); };
69  virtual const char *GetShapeAsString();
71 
73 
77  vtkGetVector6Macro(Bounds, double);
78  vtkSetVector6Macro(Bounds, double);
80 
81 protected:
83  ~vtkROIStencilSource() override;
84 
86  vtkInformationVector *) override;
87 
88  int Shape;
89  double Bounds[6];
90 
91 private:
93  void operator=(const vtkROIStencilSource&) = delete;
94 };
95 
96 #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:39
void SetShapeToCylinderX()
The shape of the region of interest.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
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.