VTK  9.3.1
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:
33  static vtkROIStencilSource* New();
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:
72  ~vtkROIStencilSource() override;
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
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:28
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.