1 /*=========================================================================
4 Module: $RCSfile: gdcmDictSet.h,v $
6 Date: $Date: 2004/06/20 18:08:47 $
7 Version: $Revision: 1.20 $
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 =========================================================================*/
26 typedef std::string DictKey;
27 typedef std::map<DictKey, gdcmDict*> DictSetHT;
29 //-----------------------------------------------------------------------------
31 * \defgroup gdcmDictSet
32 * \brief Container for managing a set of loaded dictionaries.
33 * \note Hopefully, sharing dictionaries should avoid
34 * \par reloading an already loaded dictionary (saving time)
35 * \par having many in memory representations of the same dictionary
38 class GDCM_EXPORT gdcmDictSet {
40 // TODO Swig int LoadDictFromFile(std::string filename);
41 // QUESTION: the following function might not be thread safe !? Maybe
42 // we need some mutex here, to avoid concurent creation of
43 // the same dictionary !?!?!
44 // TODO Swig int LoadDictFromName(std::string filename);
45 // TODO Swig int LoadAllDictFromDirectory(std::string DirectoryName);
46 // TODO Swig std::string* GetAllDictNames();
50 void Print(std::ostream& os);
52 std::list<std::string> *GetPubDictEntryNames(void);
53 std::map<std::string, std::list<std::string> > *
54 GetPubDictEntryNamesByCategory(void);
56 gdcmDict *LoadDictFromFile(std::string FileName, DictKey Name);
58 gdcmDict *GetDict(DictKey DictName);
59 gdcmDict *GetDefaultPubDict(void);
61 gdcmDictEntry *NewVirtualDictEntry(guint16 group, guint16 element,
62 std::string vr = "Unknown",
63 std::string fourth = "Unknown",
64 std::string name = "Unknown");
66 static std::string BuildDictPath(void);
69 bool AppendDict(gdcmDict *NewDict,DictKey Name);
72 /// Hash table of all dictionaries contained in this gdcmDictSet
74 /// Directory path to dictionaries
76 /// H table for the on the fly created gdcmDictEntries
77 std::map<std::string,gdcmDictEntry *> virtualEntry;
80 //-----------------------------------------------------------------------------