]> Creatis software - creaBruker.git/blob - lib/src1/brukerimage.h
Initial revision
[creaBruker.git] / lib / src1 / brukerimage.h
1 //
2 // C++ Interface: brukerimage
3 //
4 // Description: 
5 //
6 //
7 // Author: Denis Grenier, (C) 2009
8 //
9 // Copyright: See COPYING file that comes with this distribution
10 //
11 //
12 #ifndef BRUKERIMAGE_H
13 #define BRUKERIMAGE_H
14
15 #include "brukerdataset.h"
16 #include "brukerSystem.h"
17 /**
18 This class centralizes the informations "needed" to exploit a bruker image file 2dseq
19
20         @author Denis Grenier
21         @file brukerimage.h
22 */
23 class creaBruker_EXPORT BrukerImage{
24 public:
25    BrukerImage(BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco);
26    ~BrukerImage();
27
28    bool Init(BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
29         
30    int                  getAbsoluteTimePosition()   const;
31    double               getRelativeTimePosition()   const;
32    const std::vector <int>    &getFOVpixels()       const;
33    const std::vector <double> &getFOVcm()           const;
34    double               getSliceThickness()         const;
35    double               getTE()                     const;
36    double               getTR()                     const;
37    double               getTI()                     const;
38    double               getFlipAngle()              const;
39    int                  getNA()                     const;
40    int                  getNR()                     const;
41    int                  getDS()                     const;
42    int                  getNAE()                    const;
43    int                  getACQ_phase_factor()       const;
44    std::string          getWordType()               const;
45    std::string          getImageType()              const;
46    const std::string   &getDataEndianness()         const;
47    size_t               getImageByteSize()          const;
48    size_t               getBeginingOfImageInBytes() const;
49    
50    const std::vector <int>    &getLoopStamp() const;
51
52    const std::vector<std::vector <double> >  &getRotationMatrixRPS2XYZ()    const;
53    const std::vector <double>                &getTranslationVectorRPS2XYZ() const;
54         
55         
56 protected:
57
58 private:
59
60 // on devrait plutot les nommer 'computeXXX' (setXXX est d'habitude reserve aux accesseurs 'publics')
61
62         bool setAbsoluteTimePosition    (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
63         bool setRelativeTimePosition    (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
64         bool setFOVpixels               (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
65         bool setFOVcm                   (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
66         bool setSliceThickness          (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
67         bool setTE                      (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
68         bool setTR                      (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
69         bool setTI                      (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
70         bool setFlipAngle               (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
71         bool setLoopStamp               (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
72         bool setNA                      (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
73         bool setNR                      (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
74         bool setNAE                     (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
75         bool setDS                      (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
76         bool setACQ_phase_factor        (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
77         bool setRotationMatrixRPS2XYZ   (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
78         bool setTranslationVectorRPS2XYZ(BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
79         bool setWordType                (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
80         bool setImageType               (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
81         bool setDataEndianness          (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
82         bool setImageByteSize           (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
83         bool setBeginingOfImageInBytes  (BrukerDataSet &TheOrigAcqp, BrukerDataSet &TheOrigReco, int TheValue);
84
85         std::vector<int>    FOVpixels;
86         std::vector<double> FOVcm;
87         std::vector<int>    LoopStamp;
88         double SliceThickness;
89         double TE;
90         double TR;
91         double TI;
92         double FlipAngle;
93         double RelativeTimePosition;
94         int NA;
95         int NR;
96         int NAE;
97         int DS;
98         int ACQ_phase_factor;
99         std::vector<std::vector<double> >  RotationMatrixRPS2XYZ;
100         std::vector<double>                TranslationVectorRPS2XYZ;
101         int  AbsoluteTimePosition;
102         std::string WordType;
103         std::string ImageType;
104         std::string DataEndianness;
105         size_t ImageByteSize;
106         size_t BeginingOfImageInBytes;
107
108 };
109
110 #endif