Slicer 5.4
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkMRMLAnnotationRulerStorageNode.h
Go to the documentation of this file.
1// .NAME vtkMRMLAnnotationRulerStorageNode - MRML node for representing a volume storage
2// .SECTION Description
3// vtkMRMLAnnotationRulerStorageNode nodes describe the annotation storage
4// node that allows to read/write point data from/to file.
5
6#ifndef __vtkMRMLAnnotationRulerStorageNode_h
7#define __vtkMRMLAnnotationRulerStorageNode_h
8
9#include "vtkSlicerAnnotationsModuleMRMLExport.h"
11
13
15class VTK_SLICER_ANNOTATIONS_MODULE_MRML_EXPORT vtkMRMLAnnotationRulerStorageNode
17{
18public:
21 void PrintSelf(ostream& os, vtkIndent indent) override;
22
24
25
26 // Description:
27 // Read node attributes from XML file
28 void ReadXMLAttributes( const char** atts) override;
29
30 // Description:
31 // Write this node's information to a MRML file in XML format.
32 void WriteXML(ostream& of, int indent) override;
33
34 // Description:
35 // Copy the node's attributes to this object
36 void Copy(vtkMRMLNode *node) override;
37
38 // Description:
39 // Get node XML tag name (like Storage, Model)
40 const char* GetNodeTagName() override {return "AnnotationRulerStorage";}
41
44 int ReadOneRuler(fstream & fstr, vtkMRMLAnnotationRulerNode *refNode);
45
47 bool CanReadInReferenceNode(vtkMRMLNode* refNode) override;
48
49protected:
54
55 const char* GetAnnotationStorageType() { return "ruler"; }
56
59
61 int ReadAnnotationRulerData(vtkMRMLAnnotationRulerNode *refNode, char line[1024], int typeColumn, int line1IDColumn, int selColumn, int visColumn, int numColumns);
62 int ReadAnnotationRulerProperties(vtkMRMLAnnotationRulerNode *refNode, char line[1024], int &typeColumn, int& line1IDColumn, int& selColumn, int& visColumn, int& numColumns);
63
65 int ReadDataInternal(vtkMRMLNode *refNode) override;
66
68 int WriteAnnotationDataInternal(vtkMRMLNode *refNode, fstream & of) override;
69};
70
71#endif
int ReadAnnotationRulerData(vtkMRMLAnnotationRulerNode *refNode, char line[1024], int typeColumn, int line1IDColumn, int selColumn, int visColumn, int numColumns)
bool CanReadInReferenceNode(vtkMRMLNode *refNode) override
Return true if the node can be read in.
int WriteAnnotationDataInternal(vtkMRMLNode *refNode, fstream &of) override
Write data from the referenced node into the stream.
void Copy(vtkMRMLNode *node) override
Copy node contents from another node of the same type. Does not copy node ID and Scene....
void ReadXMLAttributes(const char **atts) override
static vtkMRMLAnnotationRulerStorageNode * New()
void PrintSelf(ostream &os, vtkIndent indent) override
int ReadAnnotationRulerProperties(vtkMRMLAnnotationRulerNode *refNode, char line[1024], int &typeColumn, int &line1IDColumn, int &selColumn, int &visColumn, int &numColumns)
int ReadDataInternal(vtkMRMLNode *refNode) override
Read data and set it in the referenced node.
const char * GetNodeTagName() override
Get node XML tag name (like Storage, Model)
void WriteXML(ostream &of, int indent) override
vtkMRMLAnnotationRulerStorageNode(const vtkMRMLAnnotationRulerStorageNode &)
int WriteAnnotationRulerData(fstream &of, vtkMRMLAnnotationRulerNode *refNode)
int WriteAnnotationRulerProperties(fstream &of, vtkMRMLAnnotationRulerNode *refNode)
vtkMRMLNode * CreateNodeInstance() override
Create instance of the default node. Like New only virtual.
int ReadAnnotation(vtkMRMLAnnotationRulerNode *refNode)
int ReadOneRuler(fstream &fstr, vtkMRMLAnnotationRulerNode *refNode)
void operator=(const vtkMRMLAnnotationRulerStorageNode &)
Abstract Superclass for all specific types of MRML nodes.