VTK: Imaging/Stencil/vtkLassoStencilSource.h Source File

| VTK 9.3.1

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:
34 static vtkLassoStencilSource* New();
35 vtkTypeMacro(vtkLassoStencilSource, vtkImageStencilSource);
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:
96 vtkLassoStencilSource();
97 ~vtkLassoStencilSource() override;
98
99 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
100
101 int Shape;
102 int SliceOrientation;
103 vtkPoints* Points;
104 vtkSpline* SplineX;
105 vtkSpline* SplineY;
106 vtkLSSPointMap* PointMap;
107
108 private:
109 vtkLassoStencilSource(const vtkLassoStencilSource&) = delete;
110 void operator=(const vtkLassoStencilSource&) = delete;
111 };
112
113 VTK_ABI_NAMESPACE_END
114 #endif
vtkImageStencilSource
generate an image stencil
Definition: vtkImageStencilSource.h:31
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkLassoStencilSource
Create a stencil from a contour.
Definition: vtkLassoStencilSource.h:32
vtkLassoStencilSource::GetSlicePoints
virtual vtkPoints * GetSlicePoints(int i)
The points for a particular slice.
vtkLassoStencilSource::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkLassoStencilSource::Shape
int Shape
Definition: vtkLassoStencilSource.h:101
vtkLassoStencilSource::Points
vtkPoints * Points
Definition: vtkLassoStencilSource.h:103
vtkLassoStencilSource::SetShapeToSpline
void SetShapeToSpline()
The shape to use, default is "Polygon".
Definition: vtkLassoStencilSource.h:52
vtkLassoStencilSource::SetPoints
virtual void SetPoints(vtkPoints *points)
The points that make up the lassoo.
vtkLassoStencilSource::GetShapeAsString
virtual const char * GetShapeAsString()
The shape to use, default is "Polygon".
vtkLassoStencilSource::SetShapeToPolygon
void SetShapeToPolygon()
The shape to use, default is "Polygon".
Definition: vtkLassoStencilSource.h:51
vtkLassoStencilSource::New
static vtkLassoStencilSource * New()
vtkLassoStencilSource::GetMTime
vtkMTimeType GetMTime() override
Overload GetMTime() to include the timestamp on the points.
vtkLassoStencilSource::SplineX
vtkSpline * SplineX
Definition: vtkLassoStencilSource.h:104
vtkLassoStencilSource::vtkLassoStencilSource
vtkLassoStencilSource()
vtkLassoStencilSource::SliceOrientation
int SliceOrientation
Definition: vtkLassoStencilSource.h:102
vtkLassoStencilSource::~vtkLassoStencilSource
~vtkLassoStencilSource() override
vtkLassoStencilSource::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
vtkLassoStencilSource::SplineY
vtkSpline * SplineY
Definition: vtkLassoStencilSource.h:105
vtkLassoStencilSource::RemoveAllSlicePoints
virtual void RemoveAllSlicePoints()
Remove points from all slices.
vtkLassoStencilSource::SetSlicePoints
virtual void SetSlicePoints(int i, vtkPoints *points)
The points for a particular slice.
vtkLassoStencilSource::PointMap
vtkLSSPointMap * PointMap
Definition: vtkLassoStencilSource.h:106
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:38
vtkSpline
spline abstract class for interpolating splines
Definition: vtkSpline.h:52
vtkX3D::Shape
@ Shape
Definition: vtkX3D.h:36
vtkX3D::points
@ points
Definition: vtkX3D.h:446
vtkImageStencilSource.h
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270