Slicer  4.8
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) VTK_OVERRIDE;
22 
23  virtual vtkMRMLNode* CreateNodeInstance() VTK_OVERRIDE;
24 
25 
26  // Description:
27  // Read node attributes from XML file
28  virtual void ReadXMLAttributes( const char** atts) VTK_OVERRIDE;
29 
30  // Description:
31  // Write this node's information to a MRML file in XML format.
32  virtual void WriteXML(ostream& of, int indent) VTK_OVERRIDE;
33 
34  // Description:
35  // Copy the node's attributes to this object
36  virtual void Copy(vtkMRMLNode *node) VTK_OVERRIDE;
37 
38  // Description:
39  // Get node XML tag name (like Storage, Model)
40  virtual const char* GetNodeTagName() VTK_OVERRIDE {return "AnnotationRulerStorage";}
41 
44  int ReadOneRuler(fstream & fstr, vtkMRMLAnnotationRulerNode *refNode);
45 
47  bool CanReadInReferenceNode(vtkMRMLNode* refNode) VTK_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  virtual int ReadDataInternal(vtkMRMLNode *refNode) VTK_OVERRIDE;
66 
68  virtual int WriteAnnotationDataInternal(vtkMRMLNode *refNode, fstream & of) VTK_OVERRIDE;
69 };
70 
71 #endif
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
int ReadAnnotation(vtkMRMLAnnotationLinesNode *refNode)
void operator=(const vtkMRMLAnnotationLinesStorageNode &)
virtual vtkMRMLNode * CreateNodeInstance() VTK_OVERRIDE
Create instance of the default node. Like New only virtual.
static vtkMRMLAnnotationLinesStorageNode * New()
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:135
virtual int ReadDataInternal(vtkMRMLNode *refNode) VTK_OVERRIDE
Read data and set it in the referenced node.
virtual bool CanReadInReferenceNode(vtkMRMLNode *refNode) VTK_OVERRIDE
Return true if the node can be read in.
virtual int WriteAnnotationDataInternal(vtkMRMLNode *refNode, fstream &of) VTK_OVERRIDE
Write data from a referenced node into a passed stream.