1 /*=========================================================================
4 Module: $RCSfile: gdcmDictSet.h,v $
6 Date: $Date: 2005/09/02 07:10:03 $
7 Version: $Revision: 1.45 $
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.html 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 =========================================================================*/
30 typedef std::map<DictKey, Dict*> DictSetHT;
31 typedef std::string ExtendedTagKey;
32 typedef std::map<ExtendedTagKey, DictEntry> ExtendedTagKeyHT;
34 //-----------------------------------------------------------------------------
36 * \brief Container for managing a set of loaded dictionaries (Dict).
37 * \note Hopefully, sharing dictionaries should avoid
38 * \par reloading an already loaded dictionary (saving time)
39 * \par having many in memory representations of the same dictionary
42 class GDCM_EXPORT DictSet : public Base
48 void Print(std::ostream &os = std::cout, std::string const &indent = "" );
50 // Probabely useless !
51 //EntryNamesList *GetPubDictEntryNames();
52 //EntryNamesByCatMap *GetPubDictEntryNamesByCategory();
54 Dict *LoadDictFromFile( std::string const &fileName,
55 DictKey const &name );
57 Dict *GetDict( DictKey const &DictName );
59 /// \brief Returns the default reference DICOM V3 public dictionary.
60 Dict* GetDefaultPubDict() { return GetDict(PUB_DICT_NAME); }
62 // \ brief Returns the virtual references DICOM dictionary.
63 // \ warning : not end user intended
64 // Dict *GetVirtualDict() { return &VirtualEntries; }
66 DictEntry *NewVirtualDictEntry(uint16_t group, uint16_t elem,
67 TagName vr = GDCM_UNKNOWN,
68 TagName vm = GDCM_UNKNOWN,
69 TagName name = GDCM_UNKNOWN);
71 Dict *GetFirstEntry();
74 static std::string BuildDictPath();
77 bool AppendDict(Dict *NewDict, DictKey const &name);
80 /// Hash table of all dictionaries contained in this DictSet
82 DictSetHT::iterator ItDictHt;
84 /// Directory path to dictionaries
87 /// H table for the on the fly created DictEntries
88 ExtendedTagKeyHT VirtualEntries;
90 } // end namespace gdcm
92 //-----------------------------------------------------------------------------