1 /*=========================================================================
4 Module: $RCSfile: gdcmDict.h,v $
6 Date: $Date: 2004/06/20 18:08:47 $
7 Version: $Revision: 1.15 $
9 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10 l'Image). All rights reserved. See Doc/License.txt or
11 http://www.creatis.insa-lyon.fr/Public/Gdcm/License.htm for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notices for more information.
17 =========================================================================*/
22 #include "gdcmCommon.h"
23 #include "gdcmDictEntry.h"
29 //-----------------------------------------------------------------------------
30 typedef std::map<TagKey, gdcmDictEntry*> TagKeyHT;
31 typedef std::map<TagName, gdcmDictEntry*> TagNameHT;
33 //-----------------------------------------------------------------------------
36 * \brief gdcmDict acts a memory representation of a dicom dictionary i.e.
37 * it is a container for a collection of dictionary entries. The
38 * dictionary is loaded from in an ascii file.
39 * There should be a single public dictionary (THE dictionary of
40 * the actual DICOM v3) but as many shadow dictionaries as imagers
41 * combined with all software versions...
44 class GDCM_EXPORT gdcmDict {
46 gdcmDict(std::string & FileName);
50 void Print(std::ostream &os = std::cout);
51 void PrintByKey(std::ostream &os = std::cout);
52 void PrintByName(std::ostream &os = std::cout);
55 bool AddNewEntry (gdcmDictEntry *NewEntry);
56 bool ReplaceEntry(gdcmDictEntry *NewEntry);
57 bool RemoveEntry (TagKey key);
58 bool RemoveEntry (guint16 group, guint16 element);
61 gdcmDictEntry *GetDictEntryByName(TagName name);
62 gdcmDictEntry *GetDictEntryByNumber(guint16 group, guint16 element);
64 std::list<std::string> *GetDictEntryNames(void);
65 std::map<std::string, std::list<std::string> > *
66 GetDictEntryNamesByCategory(void);
70 * \brief returns a ref to the Dicom Dictionary H table (map)
71 * return the Dicom Dictionary H table
73 inline TagKeyHT & GetEntriesByKey(void) { return KeyHt; }
77 * \brief returns a ref to the Dicom Dictionary H table (map)
78 * return the Dicom Dictionary H table
80 inline TagNameHT & GetEntriesByName(void) { return NameHt; }
83 /// ASCII file holding the Dictionnary
85 /// Access through TagKey (see alternate access with NameHt)
87 /// Access through TagName (see alternate access with KeyHt)
91 //-----------------------------------------------------------------------------