]> Creatis software - gdcm.git/blob - src/gdcmValEntry.h
9a5912ba1e5cc739e5073fa67ebeb0cdff912f47
[gdcm.git] / src / gdcmValEntry.h
1 // gdcmValEntry.h
2 //-----------------------------------------------------------------------------
3 #ifndef GDCMValEntry_H
4 #define GDCMValEntry_H
5
6 #include <iostream>
7 #include <stdio.h>
8
9 #include "gdcmDocEntry.h"
10
11 //-----------------------------------------------------------------------------
12 /**
13  * \ingroup gdcmValEntry
14  * \brief   The dicom header of a Dicom file contains a set of such entries
15  *          (when successfuly parsed against a given Dicom dictionary)
16  */
17 class GDCM_EXPORT gdcmValEntry  : public gdcmDocEntry {
18
19 public:
20
21    gdcmValEntry(gdcmDictEntry* e);
22         gdcmValEntry(gdcmDocEntry* d); 
23    ~gdcmValEntry(void);
24
25    /// \brief Returns the 'Value' (e.g. "Dupond Marcel") converted into a
26    /// 'string', if it's stored as an integer in the header of the
27    /// current Dicom Document Entry
28    inline std::string  GetValue(void)     { return value; };
29     
30    /// Sets the value (string) of the current Dicom Document Entry
31    inline void SetValue(std::string val)  { value = val;  };
32    
33    virtual void Print(std::ostream &os = std::cout); 
34            
35 protected:
36
37    /// \brief for 'non string' values. Will be move to gdcmBinEntry, later
38         void* voidArea;  // clean it out later
39    
40 private:
41
42 // Variables
43   
44    /// \brief Document Entry value, stored as a std::string (VR will be used,
45    /// later, to decode)
46    
47    std::string  value;
48
49 };
50
51 //-----------------------------------------------------------------------------
52 #endif
53