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