aimsdata 6.0.0
Neuroimaging data handling
giftiheader.h
Go to the documentation of this file.
1/* This software and supporting documentation are distributed by
2 * Institut Federatif de Recherche 49
3 * CEA/NeuroSpin, Batiment 145,
4 * 91191 Gif-sur-Yvette cedex
5 * France
6 *
7 * This software is governed by the CeCILL-B license under
8 * French law and abiding by the rules of distribution of free software.
9 * You can use, modify and/or redistribute the software under the
10 * terms of the CeCILL-B license as circulated by CEA, CNRS
11 * and INRIA at the following URL "http://www.cecill.info".
12 *
13 * As a counterpart to the access to the source code and rights to copy,
14 * modify and redistribute granted by the license, users are provided only
15 * with a limited warranty and the software's author, the holder of the
16 * economic rights, and the successive licensors have only limited
17 * liability.
18 *
19 * In this respect, the user's attention is drawn to the risks associated
20 * with loading, using, modifying and/or developing or reproducing the
21 * software by the user in light of its specific status of free software,
22 * that may mean that it is complicated to manipulate, and that also
23 * therefore means that it is reserved for developers and experienced
24 * professionals having in-depth computer knowledge. Users are therefore
25 * encouraged to load and test the software's suitability as regards their
26 * requirements in conditions enabling the security of their systems and/or
27 * data to be ensured and, more generally, to use and operate it in the
28 * same conditions as regards security.
29 *
30 * The fact that you are presently reading this means that you have had
31 * knowledge of the CeCILL-B license and that you accept its terms.
32 */
33
34
35#ifndef AIMS_IO_GIFTIHEADER_H
36#define AIMS_IO_GIFTIHEADER_H
37
39#include <aims/data/pheader.h>
40#include <aims/io/gifti.h>
41
42
43template <typename T> class TimeTexture;
44
45namespace carto
46{
47 class Mutex;
48}
49
50namespace aims
51{
52
56 {
57 public:
58 GiftiHeader( const std::string & name );
59 /*GiftiHeader( int dimx, int dimy, int dimz, int dimt, float sx, float sy,
60 float sz, float st, const std::string & name );*/
61 virtual ~GiftiHeader();
62
63 const std::string& name() const;
64 void setName( const std::string & fname ) { _name = fname; }
65
66 const carto::Object options() const { return _options; }
67 void setOptions( carto::Object opt ) { _options = opt; }
68
69 virtual std::string extension() const;
70
71 bool read();
72 static std::string niftiRefFromAimsString( const std::string & space );
74
75 private:
76 template <int D, typename T>
77 friend class GiftiMeshFormat;
78 template <typename T>
79 friend class GiftiTextureFormat;
80
81 gifti_image* giftiImageBase();
82 void giftiAddExternalTextures( gifti_image *gim, int & hdrtexda,
83 carto::Object da_info );
84 void giftiAddLabelTable( gifti_image *gim );
85 static carto::Object giftiFindHdrDA( int & nda, carto::Object dainfo,
86 const std::string & intent );
87 static void giftiCopyMetaToGii( carto::Object dainf, giiDataArray *da );
88 static void giftiSetTransformations( carto::Object cs, giiDataArray *da );
89 template <typename T>
90 void giftiAddTexture( gifti_image* gim, const std::vector<T> & tex );
91 template <typename T>
92 void giftiAddTexture( gifti_image* gim, const TimeTexture<T> & texture );
93
94 //void giftiAddTexture( gifti_image* gim, const std::vector<Void> & tex );
95 template <typename T>
96 void giftiAddTextureObject( gifti_image* gim, carto::Object texture );
97
98 std::string _name;
99 carto::Object _options;
100 };
101
102}
103
104#endif
const carto::Object options() const
Definition giftiheader.h:66
static std::string niftiRefFromAimsString(const std::string &space)
friend class GiftiTextureFormat
Definition giftiheader.h:79
void setName(const std::string &fname)
Definition giftiheader.h:64
static carto::Mutex & giftiMutex()
GiftiHeader(const std::string &name)
void setOptions(carto::Object opt)
Definition giftiheader.h:67
friend class GiftiMeshFormat
Definition giftiheader.h:77
const std::string & name() const
virtual std::string extension() const
standard file format extension of specialized headers
virtual ~GiftiHeader()
The class for EcatSino data write operation.