Slicer 5.9
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
12class VTK_SLICER_ANNOTATIONS_MODULE_MRML_EXPORT vtkMRMLAnnotationROINode : public vtkMRMLAnnotationLinesNode
13{
14public:
19 void PrintAnnotationInfo(ostream& os, vtkIndent indent, int titleFlag = 1) override;
20
21 //--------------------------------------------------------------------------
22 // MRMLNode methods
23 //--------------------------------------------------------------------------
24
28 const char* GetNodeTagName() override { return "AnnotationROI"; }
29
30 const char* GetIcon() override { return ":/Icons/AnnotationROI.png"; }
31
32 // Description:
34 void ReadXMLAttributes(const char** atts) override;
35
38 void WriteXML(ostream& of, int indent) override;
39
43
44 void UpdateScene(vtkMRMLScene* scene) override;
45
48 void ProcessMRMLEvents(vtkObject* /*caller*/, unsigned long /*event*/, void* /*callData*/) override;
49
52 vtkBooleanMacro(InteractiveMode, int);
53 vtkGetMacro(InteractiveMode, int);
54 vtkSetMacro(InteractiveMode, int);
55
58 vtkBooleanMacro(InsideOut, int);
59 vtkGetMacro(InsideOut, int);
60 vtkSetMacro(InsideOut, int);
61
65 void SetROIAnnotationScale(double init);
66
71
72 // int SetROI(vtkIdType line1Id, int sel, int vis);
73
76 double* GetPointColor();
77 void SetPointColor(double initColor[3]);
78
81 double* GetLineColor();
82 void SetLineColor(double newColor[3]);
83
87 void SetROIAnnotationTextColor(double initColor[3]);
88
91 void ApplyTransformMatrix(vtkMatrix4x4* transformMatrix) override;
92 void ApplyTransform(vtkAbstractTransform* transform) override;
93 virtual void GetTransformedPlanes(vtkPlanes* planes);
94
97 void Initialize(vtkMRMLScene* mrmlScene) override;
98
106 // double* GetXYZ() {return this->GetControlPointCoordinates(0);}
108 bool GetXYZ(double point[3]);
109 int SetXYZ(double newControl[3]) { return this->SetControlPoint(0, newControl); }
110
111 int SetXYZ(double nC1, double nC2, double nC3)
112 {
113 double newControl[3] = { nC1, nC2, nC3 };
114 return this->SetXYZ(newControl);
115 }
116
122 bool GetRadiusXYZ(double point[3]);
123
124 int SetRadiusXYZ(double newControl[3]) { return this->SetControlPoint(1, newControl); }
125
126 int SetRadiusXYZ(double nC1, double nC2, double nC3)
127 {
128 double newControl[3] = { nC1, nC2, nC3 };
129 return this->SetRadiusXYZ(newControl);
130 }
131
133 vtkSetStringMacro(LabelText);
134 vtkGetStringMacro(LabelText);
135
137 vtkGetStringMacro(VolumeNodeID);
138 vtkSetStringMacro(VolumeNodeID);
139
144 void GetRASBounds(double bounds[6]) override;
145
149 void GetBounds(double bounds[6]) override;
150
151 enum
152 {
155 };
156
157protected:
162
164
165 int SetControlPoint(int id, double newControl[3]);
166
167 int AddControlPoint(double newControl[3], int selectedFlag, int visibleFlag);
168
171
175
178};
179
180#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.