Slicer  5.1
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLModelStorageNode.h
Go to the documentation of this file.
1 /*=auto=========================================================================
2 
3  Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
4 
5  See COPYRIGHT.txt
6  or http://www.slicer.org/copyright/copyright.txt for details.
7 
8  Program: 3D Slicer
9  Module: $RCSfile: vtkMRMLModelStorageNode.h,v $
10  Date: $Date: 2006/03/19 17:12:29 $
11  Version: $Revision: 1.3 $
12 
13 =========================================================================auto=*/
14 
15 #ifndef __vtkMRMLModelStorageNode_h
16 #define __vtkMRMLModelStorageNode_h
17 
18 #include "vtkMRMLStorageNode.h"
19 
20 class vtkMRMLModelNode;
21 class vtkPointSet;
22 
26 class VTK_MRML_EXPORT vtkMRMLModelStorageNode : public vtkMRMLStorageNode
27 {
28 public:
29  static vtkMRMLModelStorageNode *New();
31  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
33  vtkMRMLNode* CreateNodeInstance() override;
34 
37  const char* GetNodeTagName() override {return "ModelStorage";}
38 
40  void ReadXMLAttributes(const char** atts) override;
41 
43  void WriteXML(ostream& of, int indent) override;
44 
46  bool CanReadInReferenceNode(vtkMRMLNode *refNode) override;
47 
49  vtkSetClampMacro(CoordinateSystem, int, 0, vtkMRMLStorageNode::CoordinateSystemType_Last-1);
50  vtkGetMacro(CoordinateSystem, int);
51  static const char* GetCoordinateSystemAsString(int id);
52  static int GetCoordinateSystemFromString(const char* name);
53 
56  static void ConvertBetweenRASAndLPS(vtkPointSet* inputMesh, vtkPointSet* outputMesh);
57 
58 protected:
60  ~vtkMRMLModelStorageNode() override;
63 
65  void InitializeSupportedReadFileTypes() override;
66 
68  void InitializeSupportedWriteFileTypes() override;
69 
71  vtkMRMLModelNode* GetAssociatedDataNode();
72 
74  int ReadDataInternal(vtkMRMLNode *refNode) override;
75 
77  int WriteDataInternal(vtkMRMLNode *refNode) override;
78 
79  static int GetCoordinateSystemFromFileHeader(const char* header);
80 
81  static int GetCoordinateSystemFromFieldData(vtkPointSet* mesh);
82 
84 };
85 
86 #endif
vtkMRMLNode * CreateNodeInstance() override=0
Create instance of the default node. Like New only virtual.
virtual int ReadDataInternal(vtkMRMLNode *refNode)
MRML node to represent a 3D surface model.
virtual void InitializeSupportedReadFileTypes()
MRML node for model storage on disk.
void operator=(const vtkMRMLStorageNode &)
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file
void PrintSelf(ostream &os, vtkIndent indent) override
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
A superclass for other storage nodes.
virtual void InitializeSupportedWriteFileTypes()
const char * GetNodeTagName() override
Get node XML tag name (like Storage, Model)
virtual int WriteDataInternal(vtkMRMLNode *refNode)
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
virtual bool CanReadInReferenceNode(vtkMRMLNode *refNode)=0