Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkMRMLAnnotationControlPointsNode.h
Go to the documentation of this file.
1// .NAME vtkMRMLAnnotationControlPointsNode - MRML node to represent a fiber bundle from tractography in DTI data.
2// .SECTION Description
3// Annotation nodes contains control points, internally represented as vtkPolyData.
4// An Annotation node contains many control points and forms the smallest logical unit of tractography
5// that MRML will manage/read/write. Each control point has accompanying data.
6// Visualization parameters for these nodes are controlled by the vtkMRMLAnnotationPointDisplayNode class.
7//
8
9#ifndef __vtkMRMLAnnotationControlPointsNode_h
10#define __vtkMRMLAnnotationControlPointsNode_h
11
13
15
16class VTK_SLICER_ANNOTATIONS_MODULE_MRML_EXPORT vtkMRMLAnnotationControlPointsNode : public vtkMRMLAnnotationNode
17{
18public:
21
22 // void PrintSelf(ostream& os, vtkIndent indent) override;
23 // Description:
24 // Just prints short summary
25 void PrintAnnotationInfo(ostream& os, vtkIndent indent, int titleFlag = 1) override;
26
27 //--------------------------------------------------------------------------
28 // MRMLNode methods
29 //--------------------------------------------------------------------------
30
32 // Description:
33 // Get node XML tag name (like Volume, Model)
34 const char* GetNodeTagName() override { return "AnnotationControlPoints"; }
35
36 // Description:
37 // Read node attributes from XML file
38 void ReadXMLAttributes(const char** atts) override;
39
40 // Description:
41 // Write this node's information to a MRML file in XML format.
42 void WriteXML(ostream& of, int indent) override;
43
48 void WriteCLI(std::vector<std::string>& commandLine, std::string prefix, int coordinateSystem = 0, int multipleFlag = 1) override;
49
53
54 void UpdateScene(vtkMRMLScene* scene) override;
55
56 // Description:
57 // alternative method to propagate events generated in Display nodes
58 void ProcessMRMLEvents(vtkObject* /*caller*/, unsigned long /*event*/, void* /*callData*/) override;
59
60 enum
61 {
63 };
64
65 void Modified() override
66 {
68
69 if (!this->GetDisableModifiedEvent())
70 {
72 }
73 }
74
87
88 // Description:
89 // get associated display node or nullptr if not set
91
92 // Description:
93 // Create default storage node or nullptr if does not have one
95
96 int AddControlPoint(double newControl[3], int selectedFlag, int visibleFlag);
97
98 int SetControlPoint(int id, double newControl[3], int selectedFlag, int visibleFlag);
99
100 int SetControlPointWorldCoordinates(int id, double newControl[3], int selectedFlag, int visibleFlag);
101
102 int SetControlPoint(int id, double newControl[3]);
103
104 int SetControlPointWorldCoordinates(int id, double newControl[3]);
105
106 void DeleteControlPoint(int id);
110 double* GetControlPointCoordinates(vtkIdType id);
111
112 void GetControlPointWorldCoordinates(vtkIdType id, double* point);
113
115
116 enum
117 {
121 };
122
123 const char* GetAttributeTypesEnumAsString(int val) override;
124
125 // Description:
126 // Initializes all variables associated with annotations
127 void ResetAnnotations() override;
128
129 // Description:
130 // add display node if not already present
132
142
144 virtual void SetNumberingScheme(int numberingScheme);
145 vtkGetMacro(NumberingScheme, int);
146
149 const char* GetNumberingSchemeAsString(int g);
150 void SetNumberingSchemeFromString(const char* schemeString);
151
152 void Initialize(vtkMRMLScene* mrmlScene) override;
153
154protected:
159
160 // Description:
161 // Create Poly data with substructures necessary for this class
163
164 // Description:
165 // Initializes control points as well as attributes
167
168 // Description:
169 // Initializes all attributes
171
174};
175
176#endif
void WriteXML(ostream &of, int indent) override
int AddControlPoint(double newControl[3], int selectedFlag, int visibleFlag)
const char * GetNumberingSchemeAsString()
Return a string representing the numbering scheme, set it from a string.
double * GetControlPointCoordinates(vtkIdType id)
int NumberingScheme
How the next annotation will be numbered in it's Text field.
static vtkMRMLAnnotationControlPointsNode * New()
virtual void SetNumberingScheme(int numberingScheme)
Flag determining how to number the next added fiducial.
void WriteCLI(std::vector< std::string > &commandLine, std::string prefix, int coordinateSystem=0, int multipleFlag=1) override
int SetControlPoint(int id, double newControl[3])
void UpdateScene(vtkMRMLScene *scene) override
int SetControlPointWorldCoordinates(int id, double newControl[3], int selectedFlag, int visibleFlag)
vtkMRMLAnnotationPointDisplayNode * GetAnnotationPointDisplayNode()
~vtkMRMLAnnotationControlPointsNode() override=default
void operator=(const vtkMRMLAnnotationControlPointsNode &)
int SetControlPointWorldCoordinates(int id, double newControl[3])
const char * GetNumberingSchemeAsString(int g)
vtkMRMLCopyContentDefaultMacro(vtkMRMLAnnotationControlPointsNode)
void ReadXMLAttributes(const char **atts) override
void PrintAnnotationInfo(ostream &os, vtkIndent indent, int titleFlag=1) override
vtkMRMLAnnotationControlPointsNode(const vtkMRMLAnnotationControlPointsNode &)
int SetControlPoint(int id, double newControl[3], int selectedFlag, int visibleFlag)
vtkMRMLNode * CreateNodeInstance() override
MRMLNode methods.
const char * GetAttributeTypesEnumAsString(int val) override
void SetNumberingSchemeFromString(const char *schemeString)
void Initialize(vtkMRMLScene *mrmlScene) override
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
void GetControlPointWorldCoordinates(vtkIdType id, double *point)
void ProcessMRMLEvents(vtkObject *, unsigned long, void *) override
Propagate events generated in mrml.
vtkMRMLStorageNode * CreateDefaultStorageNode() override
NumberingSchemes
flags to determine how the next fiducial added to the list is labelled
Abstract Superclass for all specific types of MRML nodes.
virtual int GetModifiedEventPending()
virtual int InvokePendingModifiedEvent()
Invokes any modified events that are pending.
virtual int GetDisableModifiedEvent()
Turn on/off generating InvokeEvent for set macros.
void Modified() override
Customized version of Modified() allowing to compress vtkCommand::ModifiedEvent.
A set of MRML Nodes that supports serialization and undo/redo.
A superclass for other storage nodes.