]> Creatis software - creaBruker.git/blob - lib/src1/brukerobjectvaryingproperties.h
Added CMake configuration to enable CDash tests.
[creaBruker.git] / lib / src1 / brukerobjectvaryingproperties.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 // C++ Interface: brukerobjectvaryingproperties
29 //
30 // Description: 
31 //
32 //
33 // Author: denis grenier <denis.grenier@creatis.univ-lyon1.fr>, (C) 2009
34 //
35 // Copyright: See COPYING file that comes with this distribution
36 //
37 //
38 #ifndef BRUKEROBJECTVARYINGPROPERTIES_H
39 #define BRUKEROBJECTVARYINGPROPERTIES_H
40 #include <cstdlib>
41 #include <stdlib.h>
42 #include <string>
43 #include <iostream>
44 #include <sstream>
45 #include <stdio.h>
46 #include <fstream>
47 #include <map>
48 #include <algorithm>
49 #include "boost/regex.hpp"
50 #include "brukerFieldData.h"
51 #include "brukerSystem.h"
52
53 /**
54         @author denis grenier <denis.grenier@creatis.univ-lyon1.fr>
55 */
56 class  /*creaBruker_EXPORT*/ BrukerObjectVaryingProperties{
57 public: 
58    BrukerObjectVaryingProperties();
59    ~BrukerObjectVaryingProperties();
60    
61    double getTE               (unsigned int theValue) const;
62    double getPositionP        (unsigned int theValue) const;
63    double getPositionR        (unsigned int theValue) const;
64    double getPositionS        (unsigned int theValue) const;
65    double getPositionTimePerNR(unsigned int theValue) const;
66    int    getAcquisitionOrder (unsigned int theValue) const;
67
68    std::vector<std::vector<double> > getOrientation(unsigned int theValue) const;
69
70    bool init(std::map<std::string, BrukerFieldData> &BrukerHM, std::vector<int> &LoopStruct);
71
72 private:
73
74    void computePositionTimePerNR (std::map<std::string, BrukerFieldData> &BrukerHM, std::vector<int> &LoopStruct);
75    void computeOrientation       (std::map<std::string, BrukerFieldData> &BrukerHM, std::vector<int> &LoopStruct);
76    void computeAcquisitionOrder  (std::map<std::string, BrukerFieldData> &BrukerHM, std::vector<int> &LoopStruct);
77    void computePositionS         (std::map<std::string, BrukerFieldData> &BrukerHM);
78    void computePositionR         (std::map<std::string, BrukerFieldData> &BrukerHM);
79    void computePositionP         (std::map<std::string, BrukerFieldData> &BrukerHM);
80    void computeTE                (std::map<std::string, BrukerFieldData> &BrukerHM);
81    std::vector<double> TE;
82    std::vector<double> PositionR;
83    std::vector<double> PositionP;
84    std::vector<double> PositionS;
85    std::vector<double> PositionTimePerNR;
86    std::vector<int>    AcquisitionOrder;
87    std::vector<std::vector<std::vector <double> > > Orientation;
88 };
89
90 #endif