00001
00002
00003 #ifndef GDCMDICT_H
00004 #define GDCMDICT_H
00005
00006 #include "gdcmCommon.h"
00007 #include "gdcmDictEntry.h"
00008
00009 #include <iostream>
00010 #include <list>
00011 #include <map>
00012
00013
00014 typedef std::map<TagKey, gdcmDictEntry*> TagKeyHT;
00015 typedef std::map<TagName, gdcmDictEntry*> TagNameHT;
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 class GDCM_EXPORT gdcmDict {
00029 public:
00030 gdcmDict(std::string & FileName);
00031 ~gdcmDict();
00032
00033
00034 void Print(std::ostream &os = std::cout);
00035 void PrintByKey(std::ostream &os = std::cout);
00036 void PrintByName(std::ostream &os = std::cout);
00037
00038
00039 bool AddNewEntry (gdcmDictEntry *NewEntry);
00040 bool ReplaceEntry(gdcmDictEntry *NewEntry);
00041 bool RemoveEntry (TagKey key);
00042 bool RemoveEntry (guint16 group, guint16 element);
00043
00044
00045 gdcmDictEntry *GetDictEntryByName(TagName name);
00046 gdcmDictEntry *GetDictEntryByNumber(guint16 group, guint16 element);
00047
00048 std::list<std::string> *GetDictEntryNames(void);
00049 std::map<std::string, std::list<std::string> > *
00050 GetDictEntryNamesByCategory(void);
00051
00057 inline TagKeyHT & gdcmDict::GetEntries(void) { return KeyHt; }
00058
00059 private:
00060 std::string filename;
00061
00063 TagKeyHT KeyHt;
00065 TagNameHT NameHt;
00066 };
00067
00068
00069 #endif