Main Page | File List | Related Pages

gdcmDict.h

00001 // gdcmDict.h
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  * \defgroup gdcmDict
00020  * \brief    gdcmDict acts a memory representation of a dicom dictionary i.e.
00021  *           it is a container for a collection of dictionary entries. The
00022  *           dictionary is loaded from in an ascii file.
00023  *           There should be a single public dictionary (THE dictionary of
00024  *           the actual DICOM v3) but as many shadow dictionaries as imagers 
00025  *           combined with all software versions...
00026  * \see gdcmDictSet
00027  */
00028 class GDCM_EXPORT gdcmDict {
00029 public:
00030    gdcmDict(std::string & FileName);
00031         ~gdcmDict();
00032 
00033 // Print
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 // Entries
00039    bool AddNewEntry (gdcmDictEntry *NewEntry);
00040         bool ReplaceEntry(gdcmDictEntry *NewEntry);
00041         bool RemoveEntry (TagKey key);
00042         bool RemoveEntry (guint16 group, guint16 element);
00043 
00044 // Tag
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

Generated on Mon Feb 14 16:13:43 2005 for gdcm by doxygen 1.3.6