Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
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 
15 class VTK_SLICER_ANNOTATIONS_MODULE_MRML_EXPORT vtkMRMLAnnotationRulerStorageNode
17 {
18 public:
21  void PrintSelf(ostream& os, vtkIndent indent) override;
22 
23  vtkMRMLNode* CreateNodeInstance() override;
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 
49 protected:
54 
55  const char* GetAnnotationStorageType() { return "ruler"; }
56 
57  int WriteAnnotationRulerProperties(fstream & of, vtkMRMLAnnotationRulerNode *refNode);
58  int WriteAnnotationRulerData(fstream& of, vtkMRMLAnnotationRulerNode *refNode);
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
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file
bool CanReadInReferenceNode(vtkMRMLNode *refNode) override
Return true if the node can be read in.
void Copy(vtkMRMLNode *node) override
Copy the node's attributes to this object
void PrintSelf(ostream &os, vtkIndent indent) override
int ReadAnnotation(vtkMRMLAnnotationLinesNode *refNode)
void operator=(const vtkMRMLAnnotationLinesStorageNode &)
const char * GetNodeTagName() override
Get node XML tag name (like Storage, Model)
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
int WriteAnnotationDataInternal(vtkMRMLNode *refNode, fstream &of) override
Write data from a referenced node into a passed stream.
vtkMRMLNode * CreateNodeInstance() override
Create instance of the default node. Like New only virtual.
static vtkMRMLAnnotationLinesStorageNode * New()
int ReadDataInternal(vtkMRMLNode *refNode) override
Read data and set it in the referenced node.
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167