]> Creatis software - creaBruker.git/blob - lib/src1/brukerFieldData.h
Added CMake configuration to enable CDash tests.
[creaBruker.git] / lib / src1 / brukerFieldData.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 #ifndef BRUKERFIELDDATA_H
28 #define BRUKERFIELDDATA_H
29 /*! \file brukerFieldData.h
30 */
31 #include <string>
32 #include <vector>
33 #include "brukerSystem.h"
34
35  /**
36 \class  BrukerFieldData
37     \brief This class is an atom to generate a BrukerDataSet
38    */
39 class /*creaBruker_EXPORT*/ BrukerFieldData 
40 {
41 friend class BrukerDataSet;
42 public:
43  /*! \brief Constructor
44 */
45   BrukerFieldData () {};
46 /*! \brief Destructor
47 */
48   ~BrukerFieldData (){};
49 /*! \brief Returns the keyword type: int, float, string as a string
50 */
51   const std::string &GetDataType()                   { return DataType;}
52 /*! \fn int GetDimensionNumber()
53         \brief Returns the dimension of the keyword:
54         0-> scalar
55         1-> 1D vector
56          2-> 2D vector
57         ...
58 */
59   int GetDimensionNumber()                           { return DimensionNumber;}
60 /*! \fn const std::vector<int> &GetDimensionNumberValue( )
61 \brief Returns a vector of size DimensionNumber giving the size of each dimension of the keyword
62 */
63   const std::vector<int> &GetDimensionNumberValue( ) { return DimensionNumberValue;}
64 /*! \fn int GetNumberOfElements()     
65 \brief Returns the total number of elements for keyword
66 */
67   int GetNumberOfElements()                          { return NumberOfElements;}
68 /*! 
69 \fn const std::vector<std::string> &GetStringValue() 
70 \brief Return a string vector of all the element of keyword
71 */
72   const std::vector<std::string> &GetStringValue()   { return StringValue;}
73 /*! 
74 \fn const std::vector<int> &GetIntValue () 
75 \brief Return an int vector of all the element of keyword
76 */
77   const std::vector<int> &GetIntValue ()             { return IntValue;}
78 /*! 
79 \fn const std::vector<double> &GetDoubleValue()
80 \brief Return a double vector of all the element of keyword
81 */
82   const std::vector<double> &GetDoubleValue()        { return DoubleValue;}
83
84
85  void PrintSelf();
86
87 private :
88 /*! \var  DataType
89 \brief Datatype of the keyword content
90 */
91   std::string DataType;
92 /*! \var DimensionNumber
93 \brief Dimmensionnality of the keyword
94 */
95   int DimensionNumber;
96 /*! \var DimensionNumberValue
97 \brief Vector of int giving the dimension of each dimension of the keyword content 
98 */
99   std::vector<int> DimensionNumberValue;
100 /*! \var NumberOfElements
101 \brief Total number of elements contained in keyword
102 */
103   int NumberOfElements;
104 /*! \var StringValue
105 \brief Vector of string containing the elements of keyword if they are string
106 */
107   std::vector<std::string> StringValue;
108 /*! \var IntValue
109 \brief Vector of string containing the elements of keyword if they are string
110 */
111   std::vector<int> IntValue;
112 /*! \var DoubleValue
113 \brief Vector of string containing the elements of keyword if they are string
114 */
115   std::vector<double> DoubleValue;
116 };
117 #endif