00001
00002
00003 #ifndef GDCMHeaderEntry_H
00004 #define GDCMHeaderEntry_H
00005
00006 #include <iostream>
00007 #include <stdio.h>
00008
00009 #include "gdcmDictEntry.h"
00010 class gdcmHeader;
00011
00012
00013
00014
00015
00016
00017 class GDCM_EXPORT gdcmHeaderEntry {
00018 public:
00019 gdcmHeaderEntry(gdcmDictEntry*);
00020
00021 inline guint16 GetGroup(void) { return entry->GetGroup(); };
00022 inline guint16 GetElement(void) { return entry->GetElement();};
00023 inline std::string GetKey(void) { return entry->GetKey(); };
00024 inline std::string GetName(void) { return entry->GetName(); };
00025 inline std::string GetVR(void) { return entry->GetVR(); };
00026 inline std::string GetValue(void) { return value; };
00027
00028 inline void * GetVoidArea(void) { return voidArea; };
00029 inline size_t GetOffset(void) { return Offset; };
00030 inline guint32 GetLength(void) { return UsableLength; };
00031
00032 inline void SetVR(std::string v) { entry->SetVR(v); };
00033 inline void SetLength(guint32 l) { ReadLength=UsableLength=l;};
00034
00035
00036 inline void SetReadLength(guint32 l) { ReadLength = l; };
00037 inline void SetUsableLength(guint32 l){ UsableLength = l; };
00038 inline guint32 GetReadLength(void) { return ReadLength;};
00039
00040 inline void SetValue(std::string val) { value = val; };
00041 inline void SetVoidArea(void * area) { voidArea = area; };
00042
00049 inline void gdcmHeaderEntry::SetOffset(size_t of) { Offset = of; };
00050
00055 inline void gdcmHeaderEntry::SetImplicitVR(void) { ImplicitVR = true; };
00056
00062 inline bool gdcmHeaderEntry::IsImplicitVR(void) { return ImplicitVR; };
00063
00069 inline bool gdcmHeaderEntry::IsVRUnknown(void) { return entry->IsVRUnknown(); };
00070
00076 inline void gdcmHeaderEntry::SetDictEntry(gdcmDictEntry *NewEntry) {
00077 entry = NewEntry;
00078 };
00079
00085 gdcmDictEntry * gdcmHeaderEntry::GetDictEntry(void) { return entry; };
00086
00092 void SetPrintLevel(int level) { printLevel = level; };
00093 void Print (std::ostream & os = std::cout);
00094
00095 private:
00096
00097
00098 friend class gdcmHeader;
00099
00100
00101 gdcmDictEntry *entry;
00102 guint32 UsableLength;
00103
00104
00105
00106 guint32 ReadLength;
00107
00108
00109
00110
00111
00112
00113
00114 bool ImplicitVR;
00115
00116
00117
00118
00119
00120 std::string value;
00121 void *voidArea;
00122
00123 size_t Offset;
00124 int printLevel;
00125 };
00126
00127
00128 #endif