forked from Slicer/SlicerGitSVNArchive
-
Notifications
You must be signed in to change notification settings - Fork 2
/
vtkMRMLModelStorageNode.h
67 lines (47 loc) · 2.15 KB
/
vtkMRMLModelStorageNode.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*=auto=========================================================================
Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
See COPYRIGHT.txt
or http://www.slicer.org/copyright/copyright.txt for details.
Program: 3D Slicer
Module: $RCSfile: vtkMRMLModelStorageNode.h,v $
Date: $Date: 2006/03/19 17:12:29 $
Version: $Revision: 1.3 $
=========================================================================auto=*/
#ifndef __vtkMRMLModelStorageNode_h
#define __vtkMRMLModelStorageNode_h
#include "vtkMRMLStorageNode.h"
class vtkMRMLModelNode;
/// \brief MRML node for model storage on disk.
///
/// Storage nodes has methods to read/write vtkPolyData to/from disk.
class VTK_MRML_EXPORT vtkMRMLModelStorageNode : public vtkMRMLStorageNode
{
public:
static vtkMRMLModelStorageNode *New();
vtkTypeMacro(vtkMRMLModelStorageNode,vtkMRMLStorageNode);
void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
virtual vtkMRMLNode* CreateNodeInstance() VTK_OVERRIDE;
///
/// Get node XML tag name (like Storage, Model)
virtual const char* GetNodeTagName() VTK_OVERRIDE {return "ModelStorage";}
/// Write this node's information to a MRML file in XML format.
virtual void WriteXML(ostream& of, int indent) VTK_OVERRIDE;
/// Return true if the reference node can be read in
virtual bool CanReadInReferenceNode(vtkMRMLNode *refNode) VTK_OVERRIDE;
protected:
vtkMRMLModelStorageNode();
~vtkMRMLModelStorageNode();
vtkMRMLModelStorageNode(const vtkMRMLModelStorageNode&);
void operator=(const vtkMRMLModelStorageNode&);
/// Initialize all the supported read file types
virtual void InitializeSupportedReadFileTypes() VTK_OVERRIDE;
/// Initialize all the supported write file types
virtual void InitializeSupportedWriteFileTypes() VTK_OVERRIDE;
/// Get data node that is associated with this storage node
vtkMRMLModelNode* GetAssociatedDataNode();
/// Read data and set it in the referenced node
virtual int ReadDataInternal(vtkMRMLNode *refNode) VTK_OVERRIDE;
/// Write data from a referenced node
virtual int WriteDataInternal(vtkMRMLNode *refNode) VTK_OVERRIDE;
};
#endif