00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef GDCMDICT_H
00020 #define GDCMDICT_H
00021
00022 #include "gdcmBase.h"
00023 #include "gdcmDictEntry.h"
00024
00025 #include <iostream>
00026 #include <list>
00027 #include <map>
00028
00029 namespace gdcm
00030 {
00031
00032
00033 typedef std::string DictKey;
00034 typedef std::map<TagKey, DictEntry> TagKeyHT;
00035
00045 class GDCM_EXPORT Dict : public Base
00046 {
00047 public:
00048 Dict();
00049 Dict(std::string const &filename);
00050 ~Dict();
00051
00052
00053 void Print(std::ostream &os = std::cout, std::string const &indent = "");
00054
00055
00056 bool AddEntry(DictEntry const &newEntry);
00057 bool ReplaceEntry(DictEntry const &newEntry);
00058 bool RemoveEntry (TagKey const &key);
00059 bool RemoveEntry (uint16_t group, uint16_t elem);
00060 void ClearEntry();
00061
00062
00063 DictEntry *GetEntry(uint16_t group, uint16_t elem);
00064
00065 DictEntry *GetFirstEntry();
00066 DictEntry *GetNextEntry();
00067
00068 private:
00070 std::string Filename;
00071
00073 TagKeyHT KeyHt;
00074 TagKeyHT::iterator ItKeyHt;
00075 };
00076 }
00077
00078
00079 #endif