Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkMRMLAnnotationLinesStorageNode.h
Go to the documentation of this file.
1// .NAME vtkMRMLAnnotationLinesStorageNode - MRML node for representing a volume storage
2// .SECTION Description
3// vtkMRMLAnnotationLinesStorageNode nodes describe the annotation storage
4// node that allows to read/write point data from/to file.
5
6#ifndef __vtkMRMLAnnotationLinesStorageNode_h
7#define __vtkMRMLAnnotationLinesStorageNode_h
8
9#include "vtkSlicerAnnotationsModuleMRMLExport.h"
11
14
15class VTK_SLICER_ANNOTATIONS_MODULE_MRML_EXPORT vtkMRMLAnnotationLinesStorageNode : public vtkMRMLAnnotationControlPointsStorageNode
16{
17public:
20 void PrintSelf(ostream& os, vtkIndent indent) override;
21
23
24 // Description:
25 // Read node attributes from XML file
26 void ReadXMLAttributes(const char** atts) override;
27
28 // Description:
29 // Write this node's information to a MRML file in XML format.
30 void WriteXML(ostream& of, int indent) override;
31
32 // Description:
33 // Copy the node's attributes to this object
34 void Copy(vtkMRMLNode* node) override;
35
36 // Description:
37 // Get node XML tag name (like Storage, Model)
38 const char* GetNodeTagName() override { return "AnnotationLinesStorage"; }
39
41 bool CanReadInReferenceNode(vtkMRMLNode* refNode) override;
42
43protected:
48
49 const char* GetAnnotationStorageType() { return "line"; }
50
51 int WriteAnnotationLineDisplayProperties(fstream& of, vtkMRMLAnnotationLineDisplayNode* refNode, std::string preposition);
54
57 char line[1024],
58 int typeColumn,
59 int startIDColumn,
60 int endIDColumn,
61 int selColumn,
62 int visColumn,
63 int numColumns);
64 int ReadAnnotationLineDisplayProperties(vtkMRMLAnnotationLineDisplayNode* refNode, std::string lineString, std::string preposition);
66 char line[1024],
67 int& typeColumn,
68 int& startIDColumn,
69 int& endIDColumn,
70 int& selColumn,
71 int& visColumn,
72 int& numColumns);
73
75 int ReadDataInternal(vtkMRMLNode* refNode) override;
76
77 // Description:
78 int WriteAnnotationDataInternal(vtkMRMLNode* refNode, fstream& of) override;
79};
80
81#endif
vtkMRMLNode * CreateNodeInstance() override
Create instance of the default node. Like New only virtual.
void WriteXML(ostream &of, int indent) override
int ReadDataInternal(vtkMRMLNode *refNode) override
Read data and set it in the referenced node.
int WriteAnnotationLineDisplayProperties(fstream &of, vtkMRMLAnnotationLineDisplayNode *refNode, std::string preposition)
const char * GetNodeTagName() override
Get node XML tag name (like Storage, Model)
void Copy(vtkMRMLNode *node) override
Copy node contents from another node of the same type. Does not copy node ID and Scene....
bool CanReadInReferenceNode(vtkMRMLNode *refNode) override
Return true if the node can be read in.
vtkMRMLAnnotationLinesStorageNode(const vtkMRMLAnnotationLinesStorageNode &)
void operator=(const vtkMRMLAnnotationLinesStorageNode &)
int ReadAnnotationLinesProperties(vtkMRMLAnnotationLinesNode *refNode, char line[1024], int &typeColumn, int &startIDColumn, int &endIDColumn, int &selColumn, int &visColumn, int &numColumns)
int WriteAnnotationDataInternal(vtkMRMLNode *refNode, fstream &of) override
Write data from a referenced node into a passed stream.
void PrintSelf(ostream &os, vtkIndent indent) override
int WriteAnnotationLinesData(fstream &of, vtkMRMLAnnotationLinesNode *refNode)
int ReadAnnotationLinesData(vtkMRMLAnnotationLinesNode *refNode, char line[1024], int typeColumn, int startIDColumn, int endIDColumn, int selColumn, int visColumn, int numColumns)
int ReadAnnotationLineDisplayProperties(vtkMRMLAnnotationLineDisplayNode *refNode, std::string lineString, std::string preposition)
int WriteAnnotationLinesProperties(fstream &of, vtkMRMLAnnotationLinesNode *refNode)
int ReadAnnotation(vtkMRMLAnnotationLinesNode *refNode)
void ReadXMLAttributes(const char **atts) override
static vtkMRMLAnnotationLinesStorageNode * New()
Abstract Superclass for all specific types of MRML nodes.