]> Creatis software - creaBruker.git/blob - lib/src1/brukerimage.h
BUG 1907 Eduardo DAVILA, BRUKER_EXPORT in .h conflict
[creaBruker.git] / lib / src1 / brukerimage.h
1 /*
2         # ---------------------------------------------------------------------
3         #
4         # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
5         #                        pour la Santé)
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
9         #
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.
16         #
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
21         #  liability. 
22         #
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         # ------------------------------------------------------------------------
26 */
27
28 //
29 // C++ Interface: brukerimage
30 //
31 // Description: 
32 //
33 //
34 // Author: Denis Grenier, (C) 2009
35 //
36 // Copyright: See COPYING file that comes with this distribution
37 //
38 //
39 #ifndef BRUKERIMAGE_H
40 #define BRUKERIMAGE_H
41
42 #include "brukerdataset.h"
43 #include "brukerSystem.h"
44 /**
45 This class centralizes the informations "needed" to exploit a bruker image file 2dseq
46
47         @author Denis Grenier
48         @file brukerimage.h
49 */
50 class /*creaBruker_EXPORT*/ BrukerImage
51 {
52 public:
53    BrukerImage(BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco);
54    ~BrukerImage();
55
56    bool Init(BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
57         
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;
63    double               getTE()                     const;
64    double               getTR()                     const;
65    double               getTI()                     const;
66    double               getFlipAngle()              const;
67    int                  getNA()                     const;
68    int                  getNR()                     const;
69    int                  getDS()                     const;
70    int                  getNAE()                    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;
77    
78    const std::vector <int>    &getLoopStamp() const;
79
80    const std::vector<std::vector <double> >  &getRotationMatrixRPS2XYZ()    const;
81    const std::vector <double>                &getTranslationVectorRPS2XYZ() const;
82         
83         
84 protected:
85
86 private:
87
88 // on devrait plutot les nommer 'computeXXX' (setXXX est d'habitude reserve aux accesseurs 'publics')
89
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);
112
113         std::vector<int>    FOVpixels;
114         std::vector<double> FOVcm;
115         std::vector<int>    LoopStamp;
116         double SliceThickness;
117         double TE;
118         double TR;
119         double TI;
120         double FlipAngle;
121         double RelativeTimePosition;
122         int NA;
123         int NR;
124         int NAE;
125         int DS;
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;
135
136 };
137
138 #endif