Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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);
123
125
144
145protected:
147 ~vtkMarkupsGlyphSource2D() override = default;
148
149 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override;
150
151 double Center[3];
152 double Scale;
153 double Scale2;
154 double Color[3];
156 int Dash;
157 int Cross;
160
161 void TransformGlyph(vtkPoints *pts);
163 unsigned char RGB[3];
164
165 void CreateVertex(vtkPoints *pts, vtkCellArray *verts,
166 vtkUnsignedCharArray *colors);
167 void CreateDash(vtkPoints *pts, vtkCellArray *lines,
168 vtkCellArray *polys, vtkUnsignedCharArray *colors, double scale = 1.0);
169 void CreateCross(vtkPoints *pts, vtkCellArray *lines,
170 vtkCellArray *polys, vtkUnsignedCharArray *colors, double scale = 1.0, bool dot=false);
171 void CreateThickCross(vtkPoints *pts, vtkCellArray *lines,
172 vtkCellArray *polys, vtkUnsignedCharArray *colors);
173 void CreateTriangle(vtkPoints *pts, vtkCellArray *lines,
174 vtkCellArray *polys, vtkUnsignedCharArray *colors);
175 void CreateSquare(vtkPoints *pts, vtkCellArray *lines,
176 vtkCellArray *polys, vtkUnsignedCharArray *colors);
177 void CreateCircle(vtkPoints *pts, vtkCellArray *lines,
178 vtkCellArray *polys, vtkUnsignedCharArray *colors);
179 void CreateDiamond(vtkPoints *pts, vtkCellArray *lines,
180 vtkCellArray *polys, vtkUnsignedCharArray *colors);
181 void CreateArrow(vtkPoints *pts, vtkCellArray *lines,
182 vtkCellArray *polys, vtkUnsignedCharArray *colors);
183 void CreateThickArrow(vtkPoints *pts, vtkCellArray *lines,
184 vtkCellArray *polys, vtkUnsignedCharArray *colors);
185 void CreateHookedArrow(vtkPoints *pts, vtkCellArray *lines,
186 vtkCellArray *polys, vtkUnsignedCharArray *colors);
187 void CreateStarBurst(vtkPoints *pts, vtkCellArray *lines,
188 vtkCellArray *polys, vtkUnsignedCharArray *colors);
189
190private:
192 void operator=(const vtkMarkupsGlyphSource2D&) = delete;
193};
194
195#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 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 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