VTK  9.3.20240419
vtkLassoStencilSource.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
20 #ifndef vtkLassoStencilSource_h
21 #define vtkLassoStencilSource_h
22 
23 #include "vtkImageStencilSource.h"
24 #include "vtkImagingStencilModule.h" // For export macro
25 
26 VTK_ABI_NAMESPACE_BEGIN
27 class vtkPoints;
28 class vtkSpline;
29 class vtkLSSPointMap;
30 
31 class VTKIMAGINGSTENCIL_EXPORT vtkLassoStencilSource : public vtkImageStencilSource
32 {
33 public:
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37 
38  enum
39  {
40  POLYGON = 0,
41  SPLINE = 1
42  };
43 
45 
49  vtkGetMacro(Shape, int);
50  vtkSetClampMacro(Shape, int, POLYGON, SPLINE);
51  void SetShapeToPolygon() { this->SetShape(POLYGON); }
52  void SetShapeToSpline() { this->SetShape(SPLINE); }
53  virtual const char* GetShapeAsString();
55 
57 
62  virtual void SetPoints(vtkPoints* points);
63  vtkGetObjectMacro(Points, vtkPoints);
65 
67 
71  vtkGetMacro(SliceOrientation, int);
72  vtkSetClampMacro(SliceOrientation, int, 0, 2);
74 
76 
81  virtual void SetSlicePoints(int i, vtkPoints* points);
82  virtual vtkPoints* GetSlicePoints(int i);
84 
88  virtual void RemoveAllSlicePoints();
89 
93  vtkMTimeType GetMTime() override;
94 
95 protected:
98 
100 
101  int Shape;
106  vtkLSSPointMap* PointMap;
107 
108 private:
110  void operator=(const vtkLassoStencilSource&) = delete;
111 };
112 
113 VTK_ABI_NAMESPACE_END
114 #endif
generate an image stencil
a simple class to control print indentation
Definition: vtkIndent.h:108
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:139
spline abstract class for interpolating splines
Definition: vtkSpline.h:52
@ Shape
Definition: vtkX3D.h:36
@ points
Definition: vtkX3D.h:446
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270