aimsdata 6.0.0
Neuroimaging data handling
fdfheader.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#ifndef AIMS_IO_FDFHEADER_H
35#define AIMS_IO_FDFHEADER_H
36
39#include <aims/def/general.h>
40#include <string>
41#include <vector>
42
43namespace aims
44{
46 {
47 public:
48
49 FdfHeader( const std::string& name, const std::string& type="UNKNOWN",
50 int x=1, int y=1, int z=1, int t=1,
51 float sx=1, float sy=1, float sz=1, float st=1 ) :
52 SliceFormatHeader( name, x, y, z, t, sx, sy, sz ,st ),
53 _type(type), _dimX(x), _dimY(y),
54 _dimZ(z), _dimT(t), _sizeX(sx), _sizeY(sy), _sizeZ(sz), _sizeT(st)
55 { }
56
57 virtual ~FdfHeader() { }
58
59 int dimX() const { return _dimX; }
60 int dimY() const { return _dimY; }
61 int dimZ() const { return _dimZ; }
62 int dimT() const { return _dimT; }
63
64 float sizeX() const { return _sizeX; }
65 float sizeY() const { return _sizeY; }
66 float sizeZ() const { return _sizeZ; }
67 float sizeT() const { return _sizeT; }
68
70 std::string dataType() const { return _type; }
71 void setType( const std::string & t );
73 std::string name() const { return _name; }
74 std::vector<std::string> possibleDataTypes() const;
75
76 virtual std::string extension() const { return( ".fdf" ); }
77 virtual std::set<std::string> extensions() const;
78
79 void read();
80 void readProcPar( std::string name );
81 virtual std::vector<std::string> inputFilenames();
82
83 protected:
84 virtual std::set<std::string> getFiles(std::string filename) const;
85
86 private:
87 std::string _type;
88 int _dimX;
89 int _dimY;
90 int _dimZ;
91 int _dimT;
92 float _sizeX;
93 float _sizeY;
94 float _sizeZ;
95 float _sizeT;
96
97 };
98
99
100}
101
102#endif
103
#define AIMSDATA_API
virtual std::set< std::string > extensions() const
possible filename extensions for specialized formats
float sizeZ() const
Definition fdfheader.h:66
float sizeT() const
Definition fdfheader.h:67
void setType(const std::string &t)
std::vector< std::string > possibleDataTypes() const
virtual std::set< std::string > getFiles(std::string filename) const
virtual std::vector< std::string > inputFilenames()
virtual std::string extension() const
standard file format extension of specialized headers
Definition fdfheader.h:76
float sizeY() const
Definition fdfheader.h:65
float sizeX() const
Definition fdfheader.h:64
int dimX() const
Definition fdfheader.h:59
int dimY() const
Definition fdfheader.h:60
int dimT() const
Definition fdfheader.h:62
std::string dataType() const
Get type of items ("U08", "S08", "U16", "S16", ...)
Definition fdfheader.h:70
void readProcPar(std::string name)
std::string name() const
Get the file name of the header.
Definition fdfheader.h:73
virtual ~FdfHeader()
Definition fdfheader.h:57
int dimZ() const
Definition fdfheader.h:61
FdfHeader(const std::string &name, const std::string &type="UNKNOWN", int x=1, int y=1, int z=1, int t=1, float sx=1, float sy=1, float sz=1, float st=1)
Definition fdfheader.h:49
SliceFormatHeader(const std::string &filename, int dimx=1, int dimy=1, int dimz=1, int dimt=1, float vsx=1, float vsy=1, float vsz=1, float vst=1)
std::string filename() const
The class for EcatSino data write operation.