Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLTableStorageNode.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Program: 3D Slicer
4 
5  Portions (c) Copyright 2015 Brigham and Women's Hospital (BWH) All Rights Reserved.
6 
7  See COPYRIGHT.txt
8  or http://www.slicer.org/copyright/copyright.txt for details.
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 
16  This file was originally developed by Andras Lasso (PerkLab, Queen's
17  University) and Kevin Wang (Princess Margaret Hospital, Toronto) and was
18  supported through OCAIRO and the Applied Cancer Research Unit program of
19  Cancer Care Ontario.
20 
21 ==============================================================================*/
22 
23 #ifndef __vtkMRMLTableStorageNode_h
24 #define __vtkMRMLTableStorageNode_h
25 
26 #include "vtkMRMLStorageNode.h"
27 
28 class vtkMRMLTableNode;
29 
43 class VTK_MRML_EXPORT vtkMRMLTableStorageNode : public vtkMRMLStorageNode
44 {
45 public:
46  static vtkMRMLTableStorageNode *New();
48  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
49 
50  virtual vtkMRMLNode* CreateNodeInstance() VTK_OVERRIDE;
51 
53  virtual const char* GetNodeTagName() VTK_OVERRIDE {return "TableStorage";}
54 
56  virtual bool CanReadInReferenceNode(vtkMRMLNode *refNode) VTK_OVERRIDE;
57 
59  virtual void SetSchemaFileName(const char* schemaFileName);
60  virtual std::string GetSchemaFileName();
61 
63  std::string FindSchemaFileName(const char* fileName);
64 
67  vtkSetMacro(AutoFindSchema, bool);
68  vtkGetMacro(AutoFindSchema, bool);
69  vtkBooleanMacro(AutoFindSchema, bool);
70 
71 protected:
76 
78  virtual void InitializeSupportedReadFileTypes() VTK_OVERRIDE;
79 
81  virtual void InitializeSupportedWriteFileTypes() VTK_OVERRIDE;
82 
84  virtual int ReadDataInternal(vtkMRMLNode *refNode) VTK_OVERRIDE;
85 
87  virtual int WriteDataInternal(vtkMRMLNode *refNode) VTK_OVERRIDE;
88 
89  std::string GenerateSchemaFileName(const char* fileName);
90 
91  virtual std::string GetFieldDelimiterCharacters(std::string filename);
92 
93  bool ReadSchema(std::string filename, vtkMRMLTableNode* tableNode);
94  bool ReadTable(std::string filename, vtkMRMLTableNode* tableNode);
95 
96  bool WriteTable(std::string filename, vtkMRMLTableNode* tableNode);
97  bool WriteSchema(std::string filename, vtkMRMLTableNode* tableNode);
98 
99  bool AutoFindSchema;
100 };
101 
102 #endif
virtual void InitializeSupportedReadFileTypes()
LRU Cache.
void operator=(const vtkMRMLStorageNode &)
virtual vtkMRMLNode * CreateNodeInstance() VTK_OVERRIDE=0
Create instance of the default node. Like New only virtual.
A superclass for other storage nodes.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
MRML node to represent a table object.
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:138
virtual bool CanReadInReferenceNode(vtkMRMLNode *refNode)=0
MRML node for handling Table node storage.