Computer Assisted Medical Intervention Tool Kit version 6.0
 
Loading...
Searching...
No Matches
CamiTKFile.h
Go to the documentation of this file.
1/*****************************************************************************
2 * $CAMITK_LICENCE_BEGIN$
3 *
4 * CamiTK - Computer Assisted Medical Intervention ToolKit
5 * (c) 2001-2025 Univ. Grenoble Alpes, CNRS, Grenoble INP - UGA, TIMC, 38000 Grenoble, France
6 *
7 * Visit http://camitk.imag.fr for more information
8 *
9 * This file is part of CamiTK.
10 *
11 * CamiTK is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * CamiTK is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
22 *
23 * $CAMITK_LICENCE_END$
24 ****************************************************************************/
25
26#ifndef CAMITKFILE_H
27#define CAMITKFILE_H
28
29#include "CamiTKAPI.h"
30
31#include <QVariant>
32class QString;
33class QUrl;
34class QDateTime;
35
36namespace camitk {
37
89public:
93 static CamiTKFile load(QString filepath);
97 static CamiTKFile load(QUrl url);
98
102 // new changes to the camitk file format
103 static const char* version;
104
106 static const int maxFileSize;
107
111 CamiTKFile();
112
116 bool save(QString filepath);
117
121 bool save(QUrl url);
122
123 bool isValid();
124 QString getVersion();
125 QDateTime getTimestamp();
126
127 void setCurrentTimestamp();
128 void setCurrentVersion();
129
138 void addContent(QString key, const QVariant);
139
140 bool hasContent(QString key);
141
142 QVariant getContent(QString key);
143
144private:
145 QVariantMap content;
146
147};
148
149
150} // camitk namespace
151
152
153#endif // CAMITKFILE_H
#define CAMITK_API
Definition CamiTKAPI.h:66
CamiTKFile provides functions to read and write in the CAMITK file format.
Definition CamiTKFile.h:88
static const int maxFileSize
maximum authorized camitk file size in bytes (to prevent memory overflow)
Definition CamiTKFile.h:106
static const char * version
Version of the camitk file format This is the CamiTK version which introduced the latest changes in t...
Definition CamiTKFile.h:103
Definition Action.cpp:40