Slicer 5.9
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// 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) { this->SetText(0, newLabel, 1, 1); }
42
43 vtkStdString GetFiducialLabel() { return this->GetText(0); }
44
45 void SetFiducialValue(const char* newValue) { this->SetText(1, newValue, 1, 1); }
46
48 int GetFiducialValue() { return 0; }
49
50 int SetFiducialCoordinates(double newCoord[3], int selFlag = 1, int visFlag = 1) { return this->SetControlPoint(0, newCoord, selFlag, visFlag); }
51
52 int SetFiducialWorldCoordinates(double newCoord[3], int selFlag = 1, int visFlag = 1) { return this->SetControlPointWorldCoordinates(0, newCoord, selFlag, visFlag); }
53
54 int SetFiducialCoordinates(double x, double y, double z)
55 {
56 double newCoord[3];
57 newCoord[0] = x;
58 newCoord[1] = y;
59 newCoord[2] = z;
60 return this->SetFiducialCoordinates(newCoord);
61 }
62
64
65 void GetFiducialWorldCoordinates(double* point) { this->GetControlPointWorldCoordinates(0, point); }
66
68 bool GetFiducialCoordinates(double coord[3]);
69
70 enum
71 {
74 };
75
76protected:
83
85};
86
87#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.