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
53 BrukerImage(BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco);
56 bool Init(BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
58 int getAbsoluteTimePosition() const;
59 double getRelativeTimePosition() const;
60 const std::vector <int> &getFOVpixels() const;
61 const std::vector <double> &getFOVcm() const;
62 double getSliceThickness() const;
66 double getFlipAngle() const;
71 int getACQ_phase_factor() const;
72 std::string getWordType() const;
73 std::string getImageType() const;
74 const std::string &getDataEndianness() const;
75 size_t getImageByteSize() const;
76 size_t getBeginingOfImageInBytes() const;
78 const std::vector <int> &getLoopStamp() const;
80 const std::vector<std::vector <double> > &getRotationMatrixRPS2XYZ() const;
81 const std::vector <double> &getTranslationVectorRPS2XYZ() const;
88 // on devrait plutot les nommer 'computeXXX' (setXXX est d'habitude reserve aux accesseurs 'publics')
90 bool setAbsoluteTimePosition (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
91 bool setRelativeTimePosition (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
92 bool setFOVpixels (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
93 bool setFOVcm (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
94 bool setSliceThickness (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
95 bool setTE (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
96 bool setTR (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
97 bool setTI (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
98 bool setFlipAngle (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
99 bool setLoopStamp (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
100 bool setNA (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
101 bool setNR (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
102 bool setNAE (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
103 bool setDS (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
104 bool setACQ_phase_factor (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
105 bool setRotationMatrixRPS2XYZ (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
106 bool setTranslationVectorRPS2XYZ(BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
107 bool setWordType (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
108 bool setImageType (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
109 bool setDataEndianness (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
110 bool setImageByteSize (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
111 bool setBeginingOfImageInBytes (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
113 std::vector<int> FOVpixels;
114 std::vector<double> FOVcm;
115 std::vector<int> LoopStamp;
116 double SliceThickness;
121 double RelativeTimePosition;
126 int ACQ_phase_factor;
127 std::vector<std::vector<double> > RotationMatrixRPS2XYZ;
128 std::vector<double> TranslationVectorRPS2XYZ;
129 int AbsoluteTimePosition;
130 std::string WordType;
131 std::string ImageType;
132 std::string DataEndianness;
133 size_t ImageByteSize;
134 size_t BeginingOfImageInBytes;