Slicer 5.6
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
19class VTK_SLICER_ANNOTATIONS_MODULE_MRML_EXPORT vtkMRMLAnnotationFiducialNode : public vtkMRMLAnnotationControlPointsNode
20{
21public:
24
25 //--------------------------------------------------------------------------
26 // MRMLNode methods
27 //--------------------------------------------------------------------------
28
31 const char* GetNodeTagName() override {return "AnnotationFiducials";}
32
33 const char* GetIcon() override {return ":/Icons/AnnotationPoint.png";}
34
35 int SetFiducial(double newControl[3],int selectedFlag, int visibleFlag);
36
38 void SetFiducialLabel(const char* newLabel)
39 {
40 this->SetText(0,newLabel,1,1);
41 }
42
43 vtkStdString GetFiducialLabel()
44 {
45 return this->GetText(0);
46 }
47
48 void SetFiducialValue(const char* newValue)
49 {
50 this->SetText(1,newValue,1,1);
51 }
52
55 {
56 return 0;
57 }
58
59 int SetFiducialCoordinates(double newCoord[3], int selFlag = 1, int visFlag = 1)
60 {
61 return this->SetControlPoint(0,newCoord,selFlag,visFlag);
62 }
63
64 int SetFiducialWorldCoordinates(double newCoord[3], int selFlag = 1, int visFlag = 1)
65 {
66 return this->SetControlPointWorldCoordinates(0,newCoord,selFlag,visFlag);
67 }
68
69 int SetFiducialCoordinates(double x, double y, double z)
70 {
71 double newCoord[3];
72 newCoord[0] = x;
73 newCoord[1] = y;
74 newCoord[2] = z;
75 return this->SetFiducialCoordinates(newCoord);
76 }
77
79 {
80 return this->GetControlPointCoordinates(0);
81 }
82
83 void GetFiducialWorldCoordinates(double *point)
84 {
85 this->GetControlPointWorldCoordinates(0, point);
86 }
87
89 bool GetFiducialCoordinates(double coord[3]);
90
91 enum
92 {
93 FiducialNodeAddedEvent = 0,
95 };
96
97protected:
104
106
107};
108
109#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.