Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkMRMLTableSQLiteStorageNode.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 vtkMRMLTableSQLiteStorageNode_h
24#define vtkMRMLTableSQLiteStorageNode_h
25
26#include "vtkMRMLStorageNode.h"
27
34
35class vtkSQLiteDatabase;
36
38{
39public:
42 void PrintSelf(ostream& os, vtkIndent indent) override;
43
45
47 const char* GetNodeTagName() override {return "TableSQLightStorage";}
48
50 bool CanReadInReferenceNode(vtkMRMLNode *refNode) override;
51
53 vtkSetStringMacro(Password);
54 vtkGetStringMacro(Password);
55
57 vtkSetStringMacro(TableName);
58 vtkGetStringMacro(TableName);
59
61 static int DropTable(char *tableName, vtkSQLiteDatabase* database);
62
63protected:
68
71
74
76 int ReadDataInternal(vtkMRMLNode *refNode) override;
77
79 int WriteDataInternal(vtkMRMLNode *refNode) override;
80
81 char *TableName;
82 char *Password;
83};
84
85#endif
void operator=(const vtkMRMLTableSQLiteStorageNode &)
static int DropTable(char *tableName, vtkSQLiteDatabase *database)
Drop a specified table from the database.
vtkMRMLTableSQLiteStorageNode(const vtkMRMLTableSQLiteStorageNode &)
void InitializeSupportedWriteFileTypes() override
Initialize all the supported write file types.
void InitializeSupportedReadFileTypes() override
Initialize all the supported write file types.
static vtkMRMLTableSQLiteStorageNode * New()
void PrintSelf(ostream &os, vtkIndent indent) override
const char * GetNodeTagName() override
Get node XML tag name (like Storage, Model)
int ReadDataInternal(vtkMRMLNode *refNode) override
Read data and set it in the referenced node. Returns 0 on failure.
~vtkMRMLTableSQLiteStorageNode() override
int WriteDataInternal(vtkMRMLNode *refNode) override
Write data from a referenced node. Returns 0 on failure.
bool CanReadInReferenceNode(vtkMRMLNode *refNode) override
Return true if the node can be read in.
vtkMRMLNode * CreateNodeInstance() override
Create instance of the default node. Like New only virtual.