Slicer 5.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkMarkupsGlyphSource2D.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Program: 3D Slicer
4
5 Portions (c) Copyright Brigham and Women's Hospital (BWH) All Rights Reserved.
6
7 See COPYRIGHT.txt
8 or http://www.slicer.org/copyright/copyright.txt for details.
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16==============================================================================*/
17
29//
35
36#ifndef __vtkMarkupsGlyphSource2D_h
37#define __vtkMarkupsGlyphSource2D_h
38
39#include "vtkSlicerMarkupsModuleVTKWidgetsExport.h"
40
41#include "vtkSlicerBaseLogic.h"
42
43// VTK includes
44#include "vtkGlyphSource2D.h"
45#include "vtkPolyDataAlgorithm.h"
46
47class vtkPoints;
48class vtkUnsignedCharArray;
49class vtkCellArray;
50
51class VTK_SLICER_MARKUPS_MODULE_VTKWIDGETS_EXPORT vtkMarkupsGlyphSource2D : public vtkPolyDataAlgorithm
52{
53public:
54 vtkTypeMacro(vtkMarkupsGlyphSource2D, vtkPolyDataAlgorithm);
55 void PrintSelf(ostream& os, vtkIndent indent) override;
56
60
62 vtkSetVector3Macro(Center, double);
63 vtkGetVectorMacro(Center, double, 3);
64
67 vtkSetClampMacro(Scale, double, 0.0, VTK_DOUBLE_MAX);
68 vtkGetMacro(Scale, double);
69
72 vtkSetClampMacro(Scale2, double, 0.0, VTK_DOUBLE_MAX);
73 vtkGetMacro(Scale2, double);
74
76 vtkSetVector3Macro(Color, double);
77 vtkGetVectorMacro(Color, double, 3);
78
82 vtkSetMacro(Filled, int);
83 vtkGetMacro(Filled, int);
84 vtkBooleanMacro(Filled, int);
85
89 vtkSetMacro(Dash, int);
90 vtkGetMacro(Dash, int);
91 vtkBooleanMacro(Dash, int);
92
96 vtkSetMacro(Cross, int);
97 vtkGetMacro(Cross, int);
98 vtkBooleanMacro(Cross, int);
99
103 vtkSetMacro(RotationAngle, double);
104 vtkGetMacro(RotationAngle, double);
105
107 vtkSetClampMacro(GlyphType, int, GlyphNone, GlyphType_Last - 1);
108 vtkGetMacro(GlyphType, int);
125
127
148
149protected:
151 ~vtkMarkupsGlyphSource2D() override = default;
152
153 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
154
155 double Center[3];
156 double Scale;
157 double Scale2;
158 double Color[3];
160 int Dash;
161 int Cross;
164
165 void TransformGlyph(vtkPoints* pts);
167 unsigned char RGB[3];
168
169 void CreateVertex(vtkPoints* pts, vtkCellArray* verts, vtkUnsignedCharArray* colors);
170 void CreateDash(vtkPoints* pts, vtkCellArray* lines, vtkCellArray* polys, vtkUnsignedCharArray* colors, double scale = 1.0);
171 void CreateCross(vtkPoints* pts, vtkCellArray* lines, vtkCellArray* polys, vtkUnsignedCharArray* colors, double scale = 1.0, bool dot = false);
172 void CreateThickCross(vtkPoints* pts, vtkCellArray* lines, vtkCellArray* polys, vtkUnsignedCharArray* colors);
173 void CreateTriangle(vtkPoints* pts, vtkCellArray* lines, vtkCellArray* polys, vtkUnsignedCharArray* colors);
174 void CreateSquare(vtkPoints* pts, vtkCellArray* lines, vtkCellArray* polys, vtkUnsignedCharArray* colors);
175 void CreateCircle(vtkPoints* pts, vtkCellArray* lines, vtkCellArray* polys, vtkUnsignedCharArray* colors);
176 void CreateDiamond(vtkPoints* pts, vtkCellArray* lines, vtkCellArray* polys, vtkUnsignedCharArray* colors);
177 void CreateArrow(vtkPoints* pts, vtkCellArray* lines, vtkCellArray* polys, vtkUnsignedCharArray* colors);
178 void CreateThickArrow(vtkPoints* pts, vtkCellArray* lines, vtkCellArray* polys, vtkUnsignedCharArray* colors);
179 void CreateHookedArrow(vtkPoints* pts, vtkCellArray* lines, vtkCellArray* polys, vtkUnsignedCharArray* colors);
180 void CreateCircledCross(vtkPoints* pts, vtkCellArray* lines, vtkCellArray* polys, vtkUnsignedCharArray* colors);
181 void CreateCircledPoint(vtkPoints* pts, vtkCellArray* lines, vtkCellArray* polys, vtkUnsignedCharArray* colors);
182 void CreateStarBurst(vtkPoints* pts, vtkCellArray* lines, vtkCellArray* polys, vtkUnsignedCharArray* colors);
183
184private:
186 void operator=(const vtkMarkupsGlyphSource2D&) = delete;
187};
188
189#endif
void CreateDash(vtkPoints *pts, vtkCellArray *lines, vtkCellArray *polys, vtkUnsignedCharArray *colors, double scale=1.0)
virtual void SetGlyphType(int)
Specify the type of glyph to generate.
void CreateTriangle(vtkPoints *pts, vtkCellArray *lines, vtkCellArray *polys, vtkUnsignedCharArray *colors)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
void CreateThickArrow(vtkPoints *pts, vtkCellArray *lines, vtkCellArray *polys, vtkUnsignedCharArray *colors)
void CreateHookedArrow(vtkPoints *pts, vtkCellArray *lines, vtkCellArray *polys, vtkUnsignedCharArray *colors)
void CreateArrow(vtkPoints *pts, vtkCellArray *lines, vtkCellArray *polys, vtkUnsignedCharArray *colors)
static vtkMarkupsGlyphSource2D * New()
void CreateSquare(vtkPoints *pts, vtkCellArray *lines, vtkCellArray *polys, vtkUnsignedCharArray *colors)
void CreateCircledCross(vtkPoints *pts, vtkCellArray *lines, vtkCellArray *polys, vtkUnsignedCharArray *colors)
void CreateThickCross(vtkPoints *pts, vtkCellArray *lines, vtkCellArray *polys, vtkUnsignedCharArray *colors)
void CreateStarBurst(vtkPoints *pts, vtkCellArray *lines, vtkCellArray *polys, vtkUnsignedCharArray *colors)
void CreateCross(vtkPoints *pts, vtkCellArray *lines, vtkCellArray *polys, vtkUnsignedCharArray *colors, double scale=1.0, bool dot=false)
void CreateCircledPoint(vtkPoints *pts, vtkCellArray *lines, vtkCellArray *polys, vtkUnsignedCharArray *colors)
void CreateCircle(vtkPoints *pts, vtkCellArray *lines, vtkCellArray *polys, vtkUnsignedCharArray *colors)
void CreateVertex(vtkPoints *pts, vtkCellArray *verts, vtkUnsignedCharArray *colors)
void CreateDiamond(vtkPoints *pts, vtkCellArray *lines, vtkCellArray *polys, vtkUnsignedCharArray *colors)
void TransformGlyph(vtkPoints *pts)
void PrintSelf(ostream &os, vtkIndent indent) override
~vtkMarkupsGlyphSource2D() override=default