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