2 # ---------------------------------------------------------------------
4 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
6 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
7 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
8 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
10 # This software is governed by the CeCILL-B license under French law and
11 # abiding by the rules of distribution of free software. You can use,
12 # modify and/ or redistribute the software under the terms of the CeCILL-B
13 # license as circulated by CEA, CNRS and INRIA at the following URL
14 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
15 # or in the file LICENSE.txt.
17 # As a counterpart to the access to the source code and rights to copy,
18 # modify and redistribute granted by the license, users are provided only
19 # with a limited warranty and the software's author, the holder of the
20 # economic rights, and the successive licensors have only limited
23 # The fact that you are presently reading this means that you have had
24 # knowledge of the CeCILL-B license and that you accept its terms.
25 # ------------------------------------------------------------------------
29 // C++ Interface: brukerimage
34 // Author: Denis Grenier, (C) 2009
36 // Copyright: See COPYING file that comes with this distribution
42 #include "brukerdataset.h"
43 #include "brukerSystem.h"
45 This class centralizes the informations "needed" to exploit a bruker image file 2dseq
50 class creaBruker_EXPORT BrukerImage{
52 BrukerImage(BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco);
55 bool Init(BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
57 int getAbsoluteTimePosition() const;
58 double getRelativeTimePosition() const;
59 const std::vector <int> &getFOVpixels() const;
60 const std::vector <double> &getFOVcm() const;
61 double getSliceThickness() const;
65 double getFlipAngle() const;
70 int getACQ_phase_factor() const;
71 std::string getWordType() const;
72 std::string getImageType() const;
73 const std::string &getDataEndianness() const;
74 size_t getImageByteSize() const;
75 size_t getBeginingOfImageInBytes() const;
77 const std::vector <int> &getLoopStamp() const;
79 const std::vector<std::vector <double> > &getRotationMatrixRPS2XYZ() const;
80 const std::vector <double> &getTranslationVectorRPS2XYZ() const;
87 // on devrait plutot les nommer 'computeXXX' (setXXX est d'habitude reserve aux accesseurs 'publics')
89 bool setAbsoluteTimePosition (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
90 bool setRelativeTimePosition (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
91 bool setFOVpixels (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
92 bool setFOVcm (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
93 bool setSliceThickness (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
94 bool setTE (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
95 bool setTR (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
96 bool setTI (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
97 bool setFlipAngle (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
98 bool setLoopStamp (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
99 bool setNA (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
100 bool setNR (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
101 bool setNAE (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
102 bool setDS (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
103 bool setACQ_phase_factor (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
104 bool setRotationMatrixRPS2XYZ (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
105 bool setTranslationVectorRPS2XYZ(BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
106 bool setWordType (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
107 bool setImageType (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
108 bool setDataEndianness (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
109 bool setImageByteSize (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
110 bool setBeginingOfImageInBytes (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
112 std::vector<int> FOVpixels;
113 std::vector<double> FOVcm;
114 std::vector<int> LoopStamp;
115 double SliceThickness;
120 double RelativeTimePosition;
125 int ACQ_phase_factor;
126 std::vector<std::vector<double> > RotationMatrixRPS2XYZ;
127 std::vector<double> TranslationVectorRPS2XYZ;
128 int AbsoluteTimePosition;
129 std::string WordType;
130 std::string ImageType;
131 std::string DataEndianness;
132 size_t ImageByteSize;
133 size_t BeginingOfImageInBytes;