Slicer 5.9
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
14class VTK_SLICER_ANNOTATIONS_MODULE_MRML_EXPORT vtkMRMLAnnotationRulerStorageNode : public vtkMRMLAnnotationLinesStorageNode
15{
16public:
19 void PrintSelf(ostream& os, vtkIndent indent) override;
20
22
23 // Description:
24 // Read node attributes from XML file
25 void ReadXMLAttributes(const char** atts) override;
26
27 // Description:
28 // Write this node's information to a MRML file in XML format.
29 void WriteXML(ostream& of, int indent) override;
30
31 // Description:
32 // Copy the node's attributes to this object
33 void Copy(vtkMRMLNode* node) override;
34
35 // Description:
36 // Get node XML tag name (like Storage, Model)
37 const char* GetNodeTagName() override { return "AnnotationRulerStorage"; }
38
41 int ReadOneRuler(fstream& fstr, vtkMRMLAnnotationRulerNode* refNode);
42
44 bool CanReadInReferenceNode(vtkMRMLNode* refNode) override;
45
46protected:
51
52 const char* GetAnnotationStorageType() { return "ruler"; }
53
56
58 int ReadAnnotationRulerData(vtkMRMLAnnotationRulerNode* refNode, char line[1024], int typeColumn, int line1IDColumn, int selColumn, int visColumn, int numColumns);
59 int ReadAnnotationRulerProperties(vtkMRMLAnnotationRulerNode* refNode, char line[1024], int& typeColumn, int& line1IDColumn, int& selColumn, int& visColumn, int& numColumns);
60
62 int ReadDataInternal(vtkMRMLNode* refNode) override;
63
65 int WriteAnnotationDataInternal(vtkMRMLNode* refNode, fstream& of) override;
66};
67
68#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.