VTK  9.3.0
vtkROIStencilSource.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
23 #ifndef vtkROIStencilSource_h
24 #define vtkROIStencilSource_h
25 
26 #include "vtkImageStencilSource.h"
27 #include "vtkImagingStencilModule.h" // For export macro
28 
29 VTK_ABI_NAMESPACE_BEGIN
30 class VTKIMAGINGSTENCIL_EXPORT vtkROIStencilSource : public vtkImageStencilSource
31 {
32 public:
35  void PrintSelf(ostream& os, vtkIndent indent) override;
36 
37  enum
38  {
39  BOX = 0,
40  ELLIPSOID = 1,
41  CYLINDERX = 2,
42  CYLINDERY = 3,
43  CYLINDERZ = 4
44  };
45 
47 
51  vtkGetMacro(Shape, int);
52  vtkSetClampMacro(Shape, int, BOX, CYLINDERZ);
53  void SetShapeToBox() { this->SetShape(BOX); }
54  void SetShapeToEllipsoid() { this->SetShape(ELLIPSOID); }
55  void SetShapeToCylinderX() { this->SetShape(CYLINDERX); }
56  void SetShapeToCylinderY() { this->SetShape(CYLINDERY); }
57  void SetShapeToCylinderZ() { this->SetShape(CYLINDERZ); }
58  virtual const char* GetShapeAsString();
60 
62 
66  vtkGetVector6Macro(Bounds, double);
67  vtkSetVector6Macro(Bounds, double);
69 
70 protected:
73 
75 
76  int Shape;
77  double Bounds[6];
78 
79 private:
81  void operator=(const vtkROIStencilSource&) = delete;
82 };
83 
84 VTK_ABI_NAMESPACE_END
85 #endif
generate an image stencil
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
create simple mask shapes
void SetShapeToBox()
The shape of the region of interest.
void SetShapeToCylinderZ()
The shape of the region of interest.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
void SetShapeToCylinderY()
The shape of the region of interest.
void SetShapeToEllipsoid()
The shape of the region of interest.
void SetShapeToCylinderX()
The shape of the region of interest.
virtual const char * GetShapeAsString()
The shape of the region of interest.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkROIStencilSource * New()
~vtkROIStencilSource() override
@ Shape
Definition: vtkX3D.h:36