Computer Assisted Medical Intervention Tool Kit  version 5.2
 
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-2024 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#ifndef CAMITKFILE_H
26#define CAMITKFILE_H
27
28#include "CamiTKAPI.h"
29
30#include <QVariant>
31class QString;
32class QUrl;
33class QDateTime;
34
35namespace camitk {
36
88public:
92 static CamiTKFile load(QString filepath);
96 static CamiTKFile load(QUrl url);
97
101 // new changes to the camitk file format
102 static const char* version;
103
105 static const int maxFileSize;
106
110 CamiTKFile();
111
115 bool save(QString filepath);
116
120 bool save(QUrl url);
121
122 bool isValid();
123 QString getVersion();
124 QDateTime getTimestamp();
125
126 void setCurrentTimestamp();
127 void setCurrentVersion();
128
137 void addContent(QString key, const QVariant);
138
139 bool hasContent(QString key);
140
141 QVariant getContent(QString key);
142
143private:
144 QVariantMap content;
145
146};
147
148
149} // camitk namespace
150
151
152#endif // CAMITKFILE_H
#define CAMITK_API
Definition CamiTKAPI.h:49
CamiTKFile provides functions to read and write in the CAMITK file format.
Definition CamiTKFile.h:87
static const int maxFileSize
maximum authorized camitk file size in bytes (to prevent memory overflow)
Definition CamiTKFile.h:105
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:102
Definition Action.cpp:36