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
vtkMRMLAnnotationFiducialNode.h
Go to the documentation of this file.
1#ifndef __vtkMRMLAnnotationFiducialNode_h
2#define __vtkMRMLAnnotationFiducialNode_h
3
4#include "vtkSlicerAnnotationsModuleMRMLExport.h"
6
7// VTK includes
8class vtkStringArray;
10
11// STD includes
12#include <string>
13
22class VTK_SLICER_ANNOTATIONS_MODULE_MRML_EXPORT vtkMRMLAnnotationFiducialNode : public vtkMRMLAnnotationControlPointsNode
23{
24public:
27
28 //--------------------------------------------------------------------------
29 // MRMLNode methods
30 //--------------------------------------------------------------------------
31
34 const char* GetNodeTagName() override {return "AnnotationFiducials";}
35
36 const char* GetIcon() override {return ":/Icons/AnnotationPoint.png";}
37
38 int SetFiducial(double newControl[3],int selectedFlag, int visibleFlag);
39
41 void SetFiducialLabel(const char* newLabel)
42 {
43 this->SetText(0,newLabel,1,1);
44 }
45
46 vtkStdString GetFiducialLabel()
47 {
48 return this->GetText(0);
49 }
50
51 void SetFiducialValue(const char* newValue)
52 {
53 this->SetText(1,newValue,1,1);
54 }
55
58 {
59 return 0;
60 }
61
62 int SetFiducialCoordinates(double newCoord[3], int selFlag = 1, int visFlag = 1)
63 {
64 return this->SetControlPoint(0,newCoord,selFlag,visFlag);
65 }
66
67 int SetFiducialWorldCoordinates(double newCoord[3], int selFlag = 1, int visFlag = 1)
68 {
69 return this->SetControlPointWorldCoordinates(0,newCoord,selFlag,visFlag);
70 }
71
72 int SetFiducialCoordinates(double x, double y, double z)
73 {
74 double newCoord[3];
75 newCoord[0] = x;
76 newCoord[1] = y;
77 newCoord[2] = z;
78 return this->SetFiducialCoordinates(newCoord);
79 }
80
82 {
83 return this->GetControlPointCoordinates(0);
84 }
85
86 void GetFiducialWorldCoordinates(double *point)
87 {
88 this->GetControlPointWorldCoordinates(0, point);
89 }
90
92 bool GetFiducialCoordinates(double coord[3]);
93
94 enum
95 {
98 };
99
100protected:
107
109
110};
111
112#endif
double * GetControlPointCoordinates(vtkIdType id)
int SetControlPointWorldCoordinates(int id, double newControl[3], int selectedFlag, int visibleFlag)
int SetControlPoint(int id, double newControl[3], int selectedFlag, int visibleFlag)
void GetControlPointWorldCoordinates(vtkIdType id, double *point)
static vtkMRMLAnnotationFiducialNode * New()
vtkMRMLAnnotationFiducialNode(const vtkMRMLAnnotationFiducialNode &)
int SetFiducial(double newControl[3], int selectedFlag, int visibleFlag)
bool GetFiducialCoordinates(double coord[3])
returns true and control point coordinate 0 on success, false and 0,0,0 on failure
void operator=(const vtkMRMLAnnotationFiducialNode &)
void SetFiducialValue(const char *newValue)
int GetFiducialValue()
return atoi(this->GetText(1).c_str());
int SetFiducialCoordinates(double x, double y, double z)
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
int SetFiducialCoordinates(double newCoord[3], int selFlag=1, int visFlag=1)
~vtkMRMLAnnotationFiducialNode() override
int SetFiducialWorldCoordinates(double newCoord[3], int selFlag=1, int visFlag=1)
void SetFiducialLabel(const char *newLabel)
Selected and visible are currently always set to 1 and are controlled by selected and visible flag.
vtkMRMLNode * CreateNodeInstance() override
MRMLNode methods.
void SetText(int id, const char *newText, int selectedFlag, int visibleFlag)
std::string GetText(int id)
Abstract Superclass for all specific types of MRML nodes.
A superclass for other storage nodes.