1 /*=========================================================================
4 Module: $RCSfile: gdcmGlobal.cxx,v $
6 Date: $Date: 2005/01/23 10:12:34 $
7 Version: $Revision: 1.16 $
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 =========================================================================*/
19 #include "gdcmGlobal.h"
21 #include "gdcmDebug.h"
24 #include "gdcmDictSet.h"
25 #include "gdcmDicomDirElement.h"
29 // Those global string that are return by reference everywhere in gdcm code
30 // used to be in gdcmCommon.h but due to a 'bug' in gcc/MacOSX
31 // you cannot have static initialization in a multithreaded environment
32 // since there is a lazy construction everything got skrew up somehow
33 // Therefore the actual initialization is done in a cxx file (avoid
34 // duplicated symbol), and an extern is used in gdcmCommon.h
35 const std::string GDCM_UNKNOWN = "gdcm::Unknown";
36 const std::string GDCM_UNFOUND = "gdcm::Unfound";
37 const std::string GDCM_BINLOADED = "gdcm::Binary data loaded";
38 const std::string GDCM_NOTLOADED = "gdcm::NotLoaded";
39 const std::string GDCM_UNREAD = "gdcm::UnRead";
42 * \brief Pointer to a container, holding _all_ the Dicom Dictionaries.
44 DictSet *Global::Dicts = (DictSet *)0;
47 * \brief Pointer to a hash table containing the 'Value Representations'.
49 VR *Global::ValRes = (VR *)0;
52 * \brief Pointer to a hash table containing the Transfer Syntax codes
53 * and their english description
55 TS *Global::TranSyn = (TS *)0;
58 * \brief Pointer to the hash table containing the Dicom Elements
59 * necessary to describe each part of a DICOMDIR
61 DicomDirElement *Global::ddElem = (DicomDirElement *)0;
64 * \brief Global container
69 * \brief constructor : populates the various H Tables
73 if (ValRes || TranSyn || Dicts || ddElem)
75 gdcmVerboseMacro( "VR or TS or Dicts already allocated");
78 Dicts = new DictSet();
81 ddElem = new DicomDirElement();
85 * \brief canonical destructor
95 * \brief returns a pointer to the 'Value Representation Table'
102 * \brief returns a pointer to the 'Transfer Syntax Table'
109 * \brief returns a pointer to Dictionaries Table
111 DictSet *Global::GetDicts()
116 * \brief returns a pointer to the DicomDir related elements Table
118 DicomDirElement *Global::GetDicomDirElements()
122 } // end namespace gdcm