Slicer 5.4
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkMRMLAnnotationFiducialNode.h
Go to the documentation of this file.
1#ifndef __vtkMRMLAnnotationFiducialNode_h
2#define __vtkMRMLAnnotationFiducialNode_h
3
4#include "vtkSlicerAnnotationsModuleMRMLExport.h"
6
7#include <vtkStdString.h>
8class vtkStringArray;
10
20class VTK_SLICER_ANNOTATIONS_MODULE_MRML_EXPORT vtkMRMLAnnotationFiducialNode : public vtkMRMLAnnotationControlPointsNode
21{
22public:
25
26 //--------------------------------------------------------------------------
27 // MRMLNode methods
28 //--------------------------------------------------------------------------
29
32 const char* GetNodeTagName() override {return "AnnotationFiducials";}
33
34 const char* GetIcon() override {return ":/Icons/AnnotationPoint.png";}
35
36 int SetFiducial(double newControl[3],int selectedFlag, int visibleFlag);
37
39 void SetFiducialLabel(const char* newLabel)
40 {
41 this->SetText(0,newLabel,1,1);
42 }
43
44 vtkStdString GetFiducialLabel()
45 {
46 return this->GetText(0);
47 }
48
49 void SetFiducialValue(const char* newValue)
50 {
51 this->SetText(1,newValue,1,1);
52 }
53
56 {
57 return 0;
58 }
59
60 int SetFiducialCoordinates(double newCoord[3], int selFlag = 1, int visFlag = 1)
61 {
62 return this->SetControlPoint(0,newCoord,selFlag,visFlag);
63 }
64
65 int SetFiducialWorldCoordinates(double newCoord[3], int selFlag = 1, int visFlag = 1)
66 {
67 return this->SetControlPointWorldCoordinates(0,newCoord,selFlag,visFlag);
68 }
69
70 int SetFiducialCoordinates(double x, double y, double z)
71 {
72 double newCoord[3];
73 newCoord[0] = x;
74 newCoord[1] = y;
75 newCoord[2] = z;
76 return this->SetFiducialCoordinates(newCoord);
77 }
78
80 {
81 return this->GetControlPointCoordinates(0);
82 }
83
84 void GetFiducialWorldCoordinates(double *point)
85 {
86 this->GetControlPointWorldCoordinates(0, point);
87 }
88
90 bool GetFiducialCoordinates(double coord[3]);
91
92 enum
93 {
94 FiducialNodeAddedEvent = 0,
96 };
97
98protected:
105
107
108};
109
110#endif
MRML node to represent a fiducial in the Annotations module - deprecated.
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.
Abstract Superclass for all specific types of MRML nodes.
A superclass for other storage nodes.