VTK  9.2.5
vtkLassoStencilSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkLassoStencilSource.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 =========================================================================*/
32 #ifndef vtkLassoStencilSource_h
33 #define vtkLassoStencilSource_h
34 
35 #include "vtkImageStencilSource.h"
36 #include "vtkImagingStencilModule.h" // For export macro
37 
38 class vtkPoints;
39 class vtkSpline;
40 class vtkLSSPointMap;
41 
42 class VTKIMAGINGSTENCIL_EXPORT vtkLassoStencilSource : public vtkImageStencilSource
43 {
44 public:
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
49  enum
50  {
51  POLYGON = 0,
52  SPLINE = 1
53  };
54 
56 
60  vtkGetMacro(Shape, int);
61  vtkSetClampMacro(Shape, int, POLYGON, SPLINE);
62  void SetShapeToPolygon() { this->SetShape(POLYGON); }
63  void SetShapeToSpline() { this->SetShape(SPLINE); }
64  virtual const char* GetShapeAsString();
66 
68 
73  virtual void SetPoints(vtkPoints* points);
74  vtkGetObjectMacro(Points, vtkPoints);
76 
78 
82  vtkGetMacro(SliceOrientation, int);
83  vtkSetClampMacro(SliceOrientation, int, 0, 2);
85 
87 
92  virtual void SetSlicePoints(int i, vtkPoints* points);
93  virtual vtkPoints* GetSlicePoints(int i);
95 
99  virtual void RemoveAllSlicePoints();
100 
104  vtkMTimeType GetMTime() override;
105 
106 protected:
109 
111 
112  int Shape;
117  vtkLSSPointMap* PointMap;
118 
119 private:
121  void operator=(const vtkLassoStencilSource&) = delete;
122 };
123 
124 #endif
generate an image stencil
a simple class to control print indentation
Definition: vtkIndent.h:119
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Create a stencil from a contour.
virtual vtkPoints * GetSlicePoints(int i)
The points for a particular slice.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetShapeToSpline()
The shape to use, default is "Polygon".
virtual void SetPoints(vtkPoints *points)
The points that make up the lassoo.
virtual const char * GetShapeAsString()
The shape to use, default is "Polygon".
void SetShapeToPolygon()
The shape to use, default is "Polygon".
static vtkLassoStencilSource * New()
vtkMTimeType GetMTime() override
Overload GetMTime() to include the timestamp on the points.
~vtkLassoStencilSource() override
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
virtual void RemoveAllSlicePoints()
Remove points from all slices.
virtual void SetSlicePoints(int i, vtkPoints *points)
The points for a particular slice.
represent and manipulate 3D points
Definition: vtkPoints.h:149
spline abstract class for interpolating splines
Definition: vtkSpline.h:82
@ Shape
Definition: vtkX3D.h:42
@ points
Definition: vtkX3D.h:452
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287