1 /*=========================================================================
4 Module: $RCSfile: gdcmGlobal.cxx,v $
6 Date: $Date: 2004/06/20 18:08:47 $
7 Version: $Revision: 1.2 $
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 =========================================================================*/
19 #include "gdcmGlobal.h"
20 #include "gdcmDebug.h"
22 #include <ctype.h> // For isspace
23 #include <string.h> // CLEANME: could this be only string ? Related to Win32 ?
27 * \brief Pointer to a container, holding _all_ the Dicom Dictionaries.
29 gdcmDictSet *gdcmGlobal::Dicts = (gdcmDictSet *)0;
33 * \brief Pointer to a hash table containing the 'Value Representations'.
35 gdcmVR *gdcmGlobal::VR = (gdcmVR *)0;
39 * \brief Pointer to a hash table containing the Transfer Syntax codes
40 * and their english description
42 gdcmTS *gdcmGlobal::TS = (gdcmTS *)0;
46 * \brief Pointer to the hash table containing the Dicom Elements
47 * necessary to describe each part of a DICOMDIR
49 gdcmDicomDirElement *gdcmGlobal::ddElem = (gdcmDicomDirElement *)0;
53 * \brief Global container
59 * \brief constructor : populates the various H Tables
61 gdcmGlobal::gdcmGlobal(void) {
62 if (VR || TS || Dicts || ddElem)
63 dbg.Verbose(0, "gdcmGlobal::gdcmGlobal : VR or TS or Dicts already allocated");
64 Dicts = new gdcmDictSet();
67 ddElem = new gdcmDicomDirElement();
72 * \brief canonical destructor
74 gdcmGlobal::~gdcmGlobal() {
82 * \brief returns a pointer to the 'Value Representation Table'
84 gdcmVR *gdcmGlobal::GetVR(void) {
89 * \brief returns a pointer to the 'Transfert Syntax Table'
91 gdcmTS *gdcmGlobal::GetTS(void) {
96 * \brief returns a pointer to Dictionaries Table
98 gdcmDictSet *gdcmGlobal::GetDicts(void) {
102 * \ingroup gdcmGlobal
103 * \brief returns a pointer to the DicomDir related elements Table
105 gdcmDicomDirElement *gdcmGlobal::GetDicomDirElements(void) {