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
vtkROIStencilSource::SetShapeToCylinderY
void SetShapeToCylinderY()
Definition: vtkROIStencilSource.h:67
vtkImageStencilSource::New
static vtkImageStencilSource * New()
vtkROIStencilSource
create simple mask shapes
Definition: vtkROIStencilSource.h:42
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkROIStencilSource::SetShapeToCylinderX
void SetShapeToCylinderX()
Definition: vtkROIStencilSource.h:66
vtkX3D::Shape
Definition: vtkX3D.h:36
vtkROIStencilSource::Shape
int Shape
Definition: vtkROIStencilSource.h:88
vtkROIStencilSource::SetShapeToEllipsoid
void SetShapeToEllipsoid()
Definition: vtkROIStencilSource.h:65
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkImageStencilSource.h
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkImageStencilSource
generate an image stencil
Definition: vtkImageStencilSource.h:42
vtkImageStencilSource::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkROIStencilSource::SetShapeToBox
void SetShapeToBox()
Definition: vtkROIStencilSource.h:64
vtkROIStencilSource::SetShapeToCylinderZ
void SetShapeToCylinderZ()
Definition: vtkROIStencilSource.h:68
vtkImageStencilAlgorithm::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)