Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLAnnotationControlPointsStorageNode.h
Go to the documentation of this file.
1 // .NAME vtkMRMLAnnotationControlPointsStorageNode - MRML node for representing a volume storage
2 // .SECTION Description
3 // vtkMRMLAnnotationControlPointsStorageNode nodes describe the annotation storage
4 // node that allows to read/write point data from/to file.
5 
6 #ifndef __vtkMRMLAnnotationControlPointsStorageNode_h
7 #define __vtkMRMLAnnotationControlPointsStorageNode_h
8 
9 #include "vtkSlicerAnnotationsModuleMRMLExport.h"
11 
14 
16 class VTK_SLICER_ANNOTATIONS_MODULE_MRML_EXPORT vtkMRMLAnnotationControlPointsStorageNode : public vtkMRMLAnnotationStorageNode
17 {
18 public:
21  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
22 
23  virtual vtkMRMLNode* CreateNodeInstance() VTK_OVERRIDE;
24 
25  // Description:
26  // Get node XML tag name (like Storage, Model)
27  virtual const char* GetNodeTagName() VTK_OVERRIDE {return "AnnotationControlPointsStorage";}
28 
29  // Initialize all the supported write file types
30  virtual bool CanReadInReferenceNode(vtkMRMLNode* refNode) VTK_OVERRIDE;
31 
32 protected:
37 
38  const char* GetAnnotationStorageType() { return "point"; }
39 
40  int WriteAnnotationPointDisplayProperties(fstream & of, vtkMRMLAnnotationPointDisplayNode *refNode, std::string preposition);
41  int WriteAnnotationControlPointsProperties(fstream & of, vtkMRMLAnnotationControlPointsNode *refNode);
42  int WriteAnnotationControlPointsData(fstream& of, vtkMRMLAnnotationControlPointsNode *refNode);
43 
45  int ReadAnnotationControlPointsData(vtkMRMLAnnotationControlPointsNode *refNode, char line[1024], int typeColumn, int xColumn, int yColumn, int zColumn,
46  int selColumn, int visColumn, int numColumns);
47  int ReadAnnotationPointDisplayProperties(vtkMRMLAnnotationPointDisplayNode *refNode, std::string lineString, std::string preposition);
48  int ReadAnnotationControlPointsProperties(vtkMRMLAnnotationControlPointsNode *refNode, char line[1024], int &typeColumn,
49  int& xColumn, int& yColumn, int& zColumn, int& selColumn, int& visColumn, int& numColumns);
50 
52  virtual int ReadDataInternal(vtkMRMLNode *refNode) VTK_OVERRIDE;
53 
54  virtual int WriteAnnotationDataInternal(vtkMRMLNode *refNode, fstream &of) VTK_OVERRIDE;
55 };
56 
57 #endif
int ReadAnnotation(vtkMRMLAnnotationNode *refNode)
virtual int WriteAnnotationDataInternal(vtkMRMLNode *refNode, fstream &of)
Write data from a referenced node into a passed stream.
void operator=(const vtkMRMLAnnotationStorageNode &)
virtual int ReadDataInternal(vtkMRMLNode *refNode) VTK_OVERRIDE
Read data and set it in the referenced node.
static vtkMRMLAnnotationStorageNode * New()
virtual vtkMRMLNode * CreateNodeInstance() VTK_OVERRIDE
Create instance of the default node. Like New only virtual.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
virtual bool CanReadInReferenceNode(vtkMRMLNode *refNode) VTK_OVERRIDE
Return true if the node can be read in.
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:138