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
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
12class VTK_SLICER_ANNOTATIONS_MODULE_MRML_EXPORT vtkMRMLAnnotationROINode
14{
15public:
20 void PrintAnnotationInfo(ostream& os, vtkIndent indent, int titleFlag = 1) override;
21
22 //--------------------------------------------------------------------------
23 // MRMLNode methods
24 //--------------------------------------------------------------------------
25
29 const char* GetNodeTagName() override {return "AnnotationROI";}
30
31 const char* GetIcon() override {return ":/Icons/AnnotationROI.png";}
32
33 // Description:
35 void ReadXMLAttributes( const char** atts) override;
36
39 void WriteXML(ostream& of, int indent) override;
40
44
45 void UpdateScene(vtkMRMLScene *scene) override;
46
49 void ProcessMRMLEvents ( vtkObject * /*caller*/,
50 unsigned long /*event*/,
51 void * /*callData*/ ) override;
52
55 vtkBooleanMacro(InteractiveMode, int);
56 vtkGetMacro(InteractiveMode, int);
57 vtkSetMacro(InteractiveMode, int);
58
59
62 vtkBooleanMacro(InsideOut, int);
63 vtkGetMacro(InsideOut, int);
64 vtkSetMacro(InsideOut, int);
65
69 void SetROIAnnotationScale(double init);
70
75
76// int SetROI(vtkIdType line1Id, int sel, int vis);
77
80 double *GetPointColor();
81 void SetPointColor( double initColor[3]);
82
85 double *GetLineColor();
86 void SetLineColor(double newColor[3]);
87
91 void SetROIAnnotationTextColor(double initColor[3]);
92
95 void ApplyTransformMatrix(vtkMatrix4x4* transformMatrix) override;
96 void ApplyTransform(vtkAbstractTransform* transform) override;
97 virtual void GetTransformedPlanes(vtkPlanes *planes);
98
101 void Initialize(vtkMRMLScene* mrmlScene) override;
102
110 //double* GetXYZ() {return this->GetControlPointCoordinates(0);}
112 bool GetXYZ(double point[3]);
113 int SetXYZ(double newControl[3])
114 {
115 return this->SetControlPoint(0, newControl);
116 }
117
118 int SetXYZ(double nC1, double nC2, double nC3)
119 {
120 double newControl[3] = {nC1,nC2,nC3};
121 return this->SetXYZ(newControl) ;
122 }
123
129 bool GetRadiusXYZ(double point[3]);
130
131 int SetRadiusXYZ(double newControl[3])
132 {
133 return this->SetControlPoint(1, newControl);
134 }
135
136 int SetRadiusXYZ(double nC1, double nC2, double nC3)
137 {
138 double newControl[3] = {nC1,nC2,nC3};
139 return this->SetRadiusXYZ(newControl);
140 }
141
142
144 vtkSetStringMacro(LabelText);
145 vtkGetStringMacro(LabelText);
146
148 vtkGetStringMacro(VolumeNodeID);
149 vtkSetStringMacro(VolumeNodeID);
150
155 void GetRASBounds(double bounds[6]) override;
156
160 void GetBounds(double bounds[6]) override;
161
162 enum
163 {
166 };
167
168
169protected:
174
176
177 int SetControlPoint(int id, double newControl[3]);
178
179 int AddControlPoint(double newControl[3],int selectedFlag, int visibleFlag);
180
183
187
190
191};
192
193#endif
int SetControlPoint(int id, double newControl[3], int selectedFlag, int visibleFlag)
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.