1 /*=========================================================================
4 Module: $RCSfile: gdcmDictSet.h,v $
6 Date: $Date: 2005/01/20 11:39:49 $
7 Version: $Revision: 1.39 $
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;
32 //-----------------------------------------------------------------------------
35 * \brief Container for managing a set of loaded dictionaries (Dict).
36 * \note Hopefully, sharing dictionaries should avoid
37 * \par reloading an already loaded dictionary (saving time)
38 * \par having many in memory representations of the same dictionary
41 class GDCM_EXPORT DictSet : public Base
47 void Print(std::ostream &os = std::cout, std::string const & indent = "" );
49 // Probabely useless !
50 //EntryNamesList *GetPubDictEntryNames();
51 //EntryNamesByCatMap* GetPubDictEntryNamesByCategory();
53 Dict *LoadDictFromFile( std::string const &fileName,
54 DictKey const &name );
56 Dict *GetDict( DictKey const &DictName );
58 /// \brief Retrieve the default reference DICOM V3 public dictionary.
59 Dict* GetDefaultPubDict() { return GetDict(PUB_DICT_NAME); };
61 // \brief Retrieve the virtual reference DICOM dictionary.
62 // \warning : not end user intended
63 // Dict *GetVirtualDict() { return &VirtualEntry; };
65 DictEntry *NewVirtualDictEntry(uint16_t group, uint16_t elem,
66 TagName vr = GDCM_UNKNOWN,
67 TagName vm = GDCM_UNKNOWN,
68 TagName name = GDCM_UNKNOWN);
70 static std::string BuildDictPath();
72 Dict *GetFirstEntry();
76 bool AppendDict(Dict *NewDict, DictKey const &name);
79 /// Hash table of all dictionaries contained in this DictSet
81 DictSetHT::iterator ItDictHt;
83 /// Directory path to dictionaries
86 /// H table for the on the fly created DictEntries
87 TagKeyHT VirtualEntry;
89 } // end namespace gdcm
91 //-----------------------------------------------------------------------------