Slicer 5.4
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkMRMLAnnotationROINode.h
Go to the documentation of this file.
1#ifndef __vtkMRMLAnnotationROINode_h
2#define __vtkMRMLAnnotationROINode_h
3
4#include "vtkSlicerAnnotationsModuleMRMLExport.h"
6
7class vtkMatrix4x4;
8class vtkPlanes;
9class vtkAbstractTransform;
10class vtkMRMLScene;
11
13class VTK_SLICER_ANNOTATIONS_MODULE_MRML_EXPORT vtkMRMLAnnotationROINode
15{
16public:
21 void PrintAnnotationInfo(ostream& os, vtkIndent indent, int titleFlag = 1) override;
22
23 //--------------------------------------------------------------------------
24 // MRMLNode methods
25 //--------------------------------------------------------------------------
26
30 const char* GetNodeTagName() override {return "AnnotationROI";}
31
32 const char* GetIcon() override {return ":/Icons/AnnotationROI.png";}
33
34 // Description:
36 void ReadXMLAttributes( const char** atts) override;
37
40 void WriteXML(ostream& of, int indent) override;
41
45
46 void UpdateScene(vtkMRMLScene *scene) override;
47
50 void ProcessMRMLEvents ( vtkObject * /*caller*/,
51 unsigned long /*event*/,
52 void * /*callData*/ ) override;
53
56 vtkBooleanMacro(InteractiveMode, int);
57 vtkGetMacro(InteractiveMode, int);
58 vtkSetMacro(InteractiveMode, int);
59
60
63 vtkBooleanMacro(InsideOut, int);
64 vtkGetMacro(InsideOut, int);
65 vtkSetMacro(InsideOut, int);
66
70 void SetROIAnnotationScale(double init);
71
76
77// int SetROI(vtkIdType line1Id, int sel, int vis);
78
81 double *GetPointColor();
82 void SetPointColor( double initColor[3]);
83
86 double *GetLineColor();
87 void SetLineColor(double newColor[3]);
88
92 void SetROIAnnotationTextColor(double initColor[3]);
93
96 void ApplyTransformMatrix(vtkMatrix4x4* transformMatrix) override;
97 void ApplyTransform(vtkAbstractTransform* transform) override;
98 virtual void GetTransformedPlanes(vtkPlanes *planes);
99
102 void Initialize(vtkMRMLScene* mrmlScene) override;
103
111 //double* GetXYZ() {return this->GetControlPointCoordinates(0);}
113 bool GetXYZ(double point[3]);
114 int SetXYZ(double newControl[3])
115 {
116 return this->SetControlPoint(0, newControl);
117 }
118
119 int SetXYZ(double nC1, double nC2, double nC3)
120 {
121 double newControl[3] = {nC1,nC2,nC3};
122 return this->SetXYZ(newControl) ;
123 }
124
130 bool GetRadiusXYZ(double point[3]);
131
132 int SetRadiusXYZ(double newControl[3])
133 {
134 return this->SetControlPoint(1, newControl);
135 }
136
137 int SetRadiusXYZ(double nC1, double nC2, double nC3)
138 {
139 double newControl[3] = {nC1,nC2,nC3};
140 return this->SetRadiusXYZ(newControl);
141 }
142
143
145 vtkSetStringMacro(LabelText);
146 vtkGetStringMacro(LabelText);
147
149 vtkGetStringMacro(VolumeNodeID);
150 vtkSetStringMacro(VolumeNodeID);
151
156 void GetRASBounds(double bounds[6]) override;
157
161 void GetBounds(double bounds[6]) override;
162
163 enum
164 {
165 ROINodeAddedEvent = 0,
167 };
168
169
170protected:
175
177
178 int SetControlPoint(int id, double newControl[3]);
179
180 int AddControlPoint(double newControl[3],int selectedFlag, int visibleFlag);
181
184
188
191
192};
193
194#endif
void UpdateScene(vtkMRMLScene *scene) override
const char * GetNodeTagName() override
void GetBounds(double bounds[6]) override
~vtkMRMLAnnotationROINode() override
void Initialize(vtkMRMLScene *mrmlScene) override
void operator=(const vtkMRMLAnnotationROINode &)
int SetXYZ(double newControl[3])
int AddControlPoint(double newControl[3], int selectedFlag, int visibleFlag)
void WriteXML(ostream &of, int indent) override
void ApplyTransform(vtkAbstractTransform *transform) override
int SetControlPoint(int id, double newControl[3])
void SetROIAnnotationScale(double init)
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file.
double * GetROIAnnotationTextColor()
void PrintAnnotationInfo(ostream &os, vtkIndent indent, int titleFlag=1) override
void SetPointColor(double initColor[3])
void SetLineColor(double newColor[3])
static vtkMRMLAnnotationROINode * New()
void GetRASBounds(double bounds[6]) override
int SetRadiusXYZ(double nC1, double nC2, double nC3)
bool GetXYZ(double point[3])
returns true and control point coordinate 0 on success, false and 0,0,0 on failure
bool GetRadiusXYZ(double point[3])
vtkMRMLAnnotationROINode(const vtkMRMLAnnotationROINode &)
void SetROIAnnotationTextColor(double initColor[3])
int InsideOut
Control the orientation of the normals.
vtkMRMLNode * CreateNodeInstance() override
MRMLNode methods.
virtual void GetTransformedPlanes(vtkPlanes *planes)
void ProcessMRMLEvents(vtkObject *, unsigned long, void *) override
vtkMRMLCopyContentMacro(vtkMRMLAnnotationROINode)
void SetROIAnnotationVisibility(int flag)
int SetXYZ(double nC1, double nC2, double nC3)
void ApplyTransformMatrix(vtkMatrix4x4 *transformMatrix) override
const char * GetIcon() override
char * VolumeNodeID
The ID of the volume associated with the ROI.
int SetRadiusXYZ(double newControl[3])
Abstract Superclass for all specific types of MRML nodes.
A set of MRML Nodes that supports serialization and undo/redo.