]> Creatis software - gdcm.git/blob - src/gdcmElValue.h
* src/gdcmElValSet.[cxx/h], gdcmElValue.[cxx/h], gdcmFile.[cxx/h],
[gdcm.git] / src / gdcmElValue.h
1 // $Header: /cvs/public/gdcm/src/Attic/gdcmElValue.h,v 1.2 2003/03/12 21:33:20 frog Exp $
2
3 #ifndef GDCMELVALUE_H
4 #define GDCMELVALUE_H
5
6 #include "gdcmDictEntry.h"
7 class gdcmHeader;
8
9
10 ///////////////////////////////////////////////////////////////////////////
11 // The dicom header of a Dicom file contains a set of such ELement VALUES
12 // (when successfuly parsed against a given Dicom dictionary)
13 class GDCM_EXPORT gdcmElValue {
14 private:
15         gdcmDictEntry *entry;
16         guint32 LgrElem;
17         bool ImplicitVr;       // Even when reading explicit vr files, some
18                                // elements happen to be implicit. Flag them here
19                                // since we can't use the entry->vr without breaking
20                                // the underlying dictionary.
21         void SetOffset(size_t of){ Offset = of; };
22    // FIXME: In fact we should be more specific and use :
23    //friend gdcmElValue * gdcmHeader::ReadNextElement(void);
24    friend class gdcmHeader;
25 public:
26         string  value;
27         size_t Offset;     // Offset from the begining of file for direct user access
28         
29         gdcmElValue(gdcmDictEntry*);
30         void SetDictEntry(gdcmDictEntry *NewEntry) { entry = NewEntry; };
31         bool   IsVrUnknown(void) { return entry->IsVrUnknown(); };
32         void SetImplicitVr(void) { ImplicitVr = true; };
33         bool  IsImplicitVr(void) { return ImplicitVr; };
34         
35         guint16 GetGroup(void)   { return entry->GetGroup();  };
36         guint16 GetElement(void) { return entry->GetElement();};
37         string  GetKey(void)     { return entry->GetKey();    };
38         string  GetName(void)    { return entry->GetName();   };
39         string  GetVR(void)      { return entry->GetVR();     };
40         void    SetVR(string v)  { entry->SetVR(v);           }; 
41         void SetLength(guint32 l){ LgrElem = l;               };
42         guint32 GetLength(void)  { return LgrElem;            };
43         
44         void SetValue(string val){ value = val; };
45         string  GetValue(void)   { return value;};
46
47         size_t  GetOffset(void)  { return Offset;};
48 };
49
50
51 #endif