X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDict.h;h=cf34024488841ec8ff7bdbebd896281bc2a3bb37;hb=49484255e3674c038cbf2259a8c3325c0039cd41;hp=37d0076e3caf192b0b103df295dafc79f6f53c06;hpb=3e78befc911eac2ecc70747854911d1f803797b5;p=gdcm.git diff --git a/src/gdcmDict.h b/src/gdcmDict.h index 37d0076e..cf340244 100644 --- a/src/gdcmDict.h +++ b/src/gdcmDict.h @@ -1,15 +1,17 @@ // gdcmDict.h - +//----------------------------------------------------------------------------- #ifndef GDCMDICT_H #define GDCMDICT_H -#include #include "gdcmCommon.h" #include "gdcmDictEntry.h" +#include +//----------------------------------------------------------------------------- typedef std::map TagKeyHT; typedef std::map TagNameHT; +//----------------------------------------------------------------------------- /* * \defgroup gdcmDict * \brief gdcmDict acts a memory representation of a dicom dictionary i.e. @@ -21,25 +23,40 @@ typedef std::map TagNameHT; * \see gdcmDictSet */ class GDCM_EXPORT gdcmDict { +public: + gdcmDict(std::string & FileName); + ~gdcmDict(); + + void Print(std::ostream&); + void PrintByKey(std::ostream&); + void PrintByName(std::ostream&); + + bool AddNewEntry (gdcmDictEntry* NewEntry); + bool ReplaceEntry(gdcmDictEntry* NewEntry); + bool RemoveEntry (TagKey key); + bool RemoveEntry (guint16 group, guint16 element); + + gdcmDictEntry * GetTagByNumber(guint16 group, guint16 element); + gdcmDictEntry * GetTagByName(TagName name); + + /** + * \ingroup gdcmDict + * \brief returns a ref to the Dicom Dictionary H table (map) + * return the Dicom Dictionary H table + */ + inline TagKeyHT & gdcmDict::GetEntries(void) { + return KeyHt; + } + +private: std::string name; std::string filename; /// Access through TagKey (see alternate access with NameHt) TagKeyHT KeyHt; /// Access through TagName (see alternate access with KeyHt) TagNameHT NameHt; -public: - gdcmDict(std::string & FileName); - ~gdcmDict(); - int AddNewEntry (gdcmDictEntry* NewEntry); - int ReplaceEntry(gdcmDictEntry* NewEntry); - int RemoveEntry (TagKey key); - int RemoveEntry (guint16 group, guint16 element); - gdcmDictEntry * GetTagByNumber(guint16 group, guint16 element); - gdcmDictEntry * GetTagByName(TagName name); - void Print(std::ostream&); - void PrintByKey(std::ostream&); - void PrintByName(std::ostream&); - TagKeyHT & GetEntries(void) { return KeyHt; } + }; +//----------------------------------------------------------------------------- #endif