Slicer  5.0
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
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) override;
22 
23  vtkMRMLNode* CreateNodeInstance() override;
24 
25  // Description:
26  // Get node XML tag name (like Storage, Model)
27  const char* GetNodeTagName() override {return "AnnotationControlPointsStorage";}
28 
29  // Initialize all the supported write file types
30  bool CanReadInReferenceNode(vtkMRMLNode* refNode) 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  int ReadDataInternal(vtkMRMLNode *refNode) override;
53 
54  int WriteAnnotationDataInternal(vtkMRMLNode *refNode, fstream &of) override;
55 };
56 
57 #endif
bool CanReadInReferenceNode(vtkMRMLNode *refNode) override
Return true if the node can be read in.
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 &)
static vtkMRMLAnnotationStorageNode * New()
const char * GetNodeTagName() override
Get node XML tag name (like Storage, Model)
void PrintSelf(ostream &os, vtkIndent indent) override
vtkMRMLNode * CreateNodeInstance() override
Create instance of the default node. Like New only virtual.
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