Slicer  4.11
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 
54 protected:
56  ~vtkMRMLModelStorageNode() override;
59 
61  void InitializeSupportedReadFileTypes() override;
62 
64  void InitializeSupportedWriteFileTypes() override;
65 
67  vtkMRMLModelNode* GetAssociatedDataNode();
68 
70  int ReadDataInternal(vtkMRMLNode *refNode) override;
71 
73  int WriteDataInternal(vtkMRMLNode *refNode) override;
74 
75  static void ConvertBetweenRASAndLPS(vtkPointSet* inputMesh, vtkPointSet* outputMesh);
76 
77  static int GetCoordinateSystemFromFileHeader(const char* header);
78 
79  static int GetCoordinateSystemFromFieldData(vtkPointSet* mesh);
80 
82 };
83 
84 #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