Slicer  5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLAnnotationLinesStorageNode.h
Go to the documentation of this file.
1 // .NAME vtkMRMLAnnotationLinesStorageNode - MRML node for representing a volume storage
2 // .SECTION Description
3 // vtkMRMLAnnotationLinesStorageNode nodes describe the annotation storage
4 // node that allows to read/write point data from/to file.
5 
6 #ifndef __vtkMRMLAnnotationLinesStorageNode_h
7 #define __vtkMRMLAnnotationLinesStorageNode_h
8 
9 #include "vtkSlicerAnnotationsModuleMRMLExport.h"
11 
14 
16 class VTK_SLICER_ANNOTATIONS_MODULE_MRML_EXPORT vtkMRMLAnnotationLinesStorageNode
18 {
19  public:
22  void PrintSelf(ostream& os, vtkIndent indent) override;
23 
24  vtkMRMLNode* CreateNodeInstance() override;
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 "AnnotationLinesStorage";}
41 
43  bool CanReadInReferenceNode(vtkMRMLNode* refNode) override;
44 
45 protected:
50 
51  const char* GetAnnotationStorageType() { return "line"; }
52 
53  int WriteAnnotationLineDisplayProperties(fstream & of, vtkMRMLAnnotationLineDisplayNode *refNode, std::string preposition);
54  int WriteAnnotationLinesProperties(fstream & of, vtkMRMLAnnotationLinesNode *refNode);
55  int WriteAnnotationLinesData(fstream& of, vtkMRMLAnnotationLinesNode *refNode);
56 
58  int ReadAnnotationLinesData(vtkMRMLAnnotationLinesNode *refNode, char line[1024], int typeColumn, int startIDColumn, int endIDColumn, int selColumn, int visColumn, int numColumns);
59  int ReadAnnotationLineDisplayProperties(vtkMRMLAnnotationLineDisplayNode *refNode, std::string lineString, std::string preposition);
60  int ReadAnnotationLinesProperties(vtkMRMLAnnotationLinesNode *refNode, char line[1024], int &typeColumn, int& startIDColumn, int& endIDColumn, int& selColumn, int& visColumn, int& numColumns);
61 
63  int ReadDataInternal(vtkMRMLNode *refNode) override;
64 
65  // Description:
66  int WriteAnnotationDataInternal(vtkMRMLNode *refNode, fstream & of) override;
67 };
68 
69 #endif
70 
71 
72 
const char * GetNodeTagName() override
Get node XML tag name (like Storage, Model)
void PrintSelf(ostream &os, vtkIndent indent) override
int ReadAnnotation(vtkMRMLAnnotationControlPointsNode *refNode)
vtkMRMLNode * CreateNodeInstance() override
Create instance of the default node. Like New only virtual.
bool CanReadInReferenceNode(vtkMRMLNode *refNode) override
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file
static vtkMRMLAnnotationControlPointsStorageNode * New()
int WriteAnnotationDataInternal(vtkMRMLNode *refNode, fstream &of) override
Write data from a referenced node into a passed stream.
void Copy(vtkMRMLNode *node) override
Copy the node's attributes to this object
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
void operator=(const vtkMRMLAnnotationControlPointsStorageNode &)
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
int ReadDataInternal(vtkMRMLNode *refNode) override
Read data and set it in the referenced node.