1 /*=========================================================================
4 Module: $RCSfile: gdcmDictSet.h,v $
6 Date: $Date: 2004/10/18 02:17:07 $
7 Version: $Revision: 1.28 $
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 =========================================================================*/
28 typedef std::string DictKey;
29 typedef std::map<DictKey, Dict*> DictSetHT;
31 //-----------------------------------------------------------------------------
34 * \brief Container for managing a set of loaded dictionaries.
35 * \note Hopefully, sharing dictionaries should avoid
36 * \par reloading an already loaded dictionary (saving time)
37 * \par having many in memory representations of the same dictionary
40 class GDCM_EXPORT DictSet
46 void Print(std::ostream& os);
48 EntryNamesList * GetPubDictEntryNames();
49 EntryNamesByCatMap * GetPubDictEntryNamesByCategory();
51 Dict* LoadDictFromFile( std::string const & fileName,
52 DictKey const & name );
54 Dict* GetDict( DictKey const & DictName );
56 /// \brief Retrieve the default reference DICOM V3 public dictionary.
57 Dict* GetDefaultPubDict() { return GetDict(PUB_DICT_NAME); };
59 // \brief Retrieve the virtual reference DICOM dictionary.
60 // \warning : not end user intended
61 // Dict* GetVirtualDict() { return &VirtualEntry; };
63 DictEntry* NewVirtualDictEntry(uint16_t group, uint16_t element,
64 TagName vr = "Unknown",
65 TagName fourth = "Unknown",
66 TagName name = "Unknown");
68 static std::string BuildDictPath();
71 bool AppendDict(Dict *NewDict, DictKey const & name);
74 /// Hash table of all dictionaries contained in this DictSet
77 /// Directory path to dictionaries
80 /// H table for the on the fly created DictEntries
81 TagKeyHT VirtualEntry;
83 } // end namespace gdcm
85 //-----------------------------------------------------------------------------