Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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
16{
17public:
20 void PrintSelf(ostream& os, vtkIndent indent) override;
21
23
24
25 // Description:
26 // Read node attributes from XML file
27 void ReadXMLAttributes( const char** atts) override;
28
29 // Description:
30 // Write this node's information to a MRML file in XML format.
31 void WriteXML(ostream& of, int indent) override;
32
33 // Description:
34 // Copy the node's attributes to this object
35 void Copy(vtkMRMLNode *node) override;
36
37 // Description:
38 // Get node XML tag name (like Storage, Model)
39 const char* GetNodeTagName() override {return "AnnotationRulerStorage";}
40
43 int ReadOneRuler(fstream & fstr, vtkMRMLAnnotationRulerNode *refNode);
44
46 bool CanReadInReferenceNode(vtkMRMLNode* refNode) override;
47
48protected:
53
54 const char* GetAnnotationStorageType() { return "ruler"; }
55
58
60 int ReadAnnotationRulerData(vtkMRMLAnnotationRulerNode *refNode, char line[1024], int typeColumn, int line1IDColumn, int selColumn, int visColumn, int numColumns);
61 int ReadAnnotationRulerProperties(vtkMRMLAnnotationRulerNode *refNode, char line[1024], int &typeColumn, int& line1IDColumn, int& selColumn, int& visColumn, int& numColumns);
62
64 int ReadDataInternal(vtkMRMLNode *refNode) override;
65
67 int WriteAnnotationDataInternal(vtkMRMLNode *refNode, fstream & of) override;
68};
69
70#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.