Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

gdcmGlobal.cxx

Go to the documentation of this file.
00001 /*=========================================================================
00002                                                                                 
00003   Program:   gdcm
00004   Module:    $RCSfile: gdcmGlobal.cxx,v $
00005   Language:  C++
00006   Date:      $Date: 2006/01/11 10:44:24 $
00007   Version:   $Revision: 1.31 $
00008                                                                                 
00009   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
00010   l'Image). All rights reserved. See Doc/License.txt or
00011   http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
00012                                                                                 
00013      This software is distributed WITHOUT ANY WARRANTY; without even
00014      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00015      PURPOSE.  See the above copyright notices for more information.
00016                                                                                 
00017 =========================================================================*/
00018 
00019 #include "gdcmGlobal.h"
00020 
00021 #include "gdcmDebug.h"
00022 #include "gdcmVR.h"
00023 #include "gdcmTS.h"
00024 #include "gdcmDictGroupName.h"
00025 #include "gdcmDictSet.h"
00026 #include "gdcmDicomDirElement.h"
00027 
00028 namespace gdcm 
00029 {
00030 //-----------------------------------------------------------------------------
00037 
00038 const std::string GDCM_UNKNOWN   = "gdcm::Unknown";
00039 const std::string GDCM_UNFOUND   = "gdcm::Unfound";
00040 const std::string GDCM_BINLOADED = "gdcm::Binary data loaded";
00041 const std::string GDCM_NOTLOADED = "gdcm::NotLoaded";
00042 const std::string GDCM_UNREAD    = "gdcm::UnRead";
00043 const std::string GDCM_NOTASCII  = "gdcm::NotAscii";
00044 const std::string GDCM_PIXELDATA = "gdcm::Pixel Data to be loaded";
00045 
00046 const std::string GDCM_VRUNKNOWN = "  ";
00047 
00048 #ifdef _WIN32
00049 const char GDCM_FILESEPARATOR = '\\';
00050 #else
00051 const char GDCM_FILESEPARATOR = '/';
00052 #endif
00053 
00054 //-----------------------------------------------------------------------------
00055 DictSet         *Global::Dicts     = (DictSet *)0;
00056 VR              *Global::ValRes    = (VR *)0;
00057 TS              *Global::TranSyn   = (TS *)0;
00058 DictGroupName   *Global::GroupName = (DictGroupName *)0;
00059 DicomDirElement *Global::ddElem    = (DicomDirElement *)0;
00060 
00061 //-----------------------------------------------------------------------------
00065 Global Glob;
00066 
00067 //-------------------------------------------------------------------------
00068 // Constructor / Destructor
00072 Global::Global()
00073 {
00074    if (ValRes || TranSyn || Dicts || ddElem || GroupName )
00075    {
00076       gdcmStaticWarningMacro( "VR or TS or Dicts or ... already allocated");
00077       return;
00078    }
00079    Dicts     = DictSet::New();
00080    ValRes    = VR::New();
00081    TranSyn   = TS::New();
00082    GroupName = DictGroupName::New();
00083    ddElem    = DicomDirElement::New();
00084 }
00085 
00089 Global::~Global()
00090 {
00091    Dicts->Delete();
00092    ValRes->Delete();
00093    TranSyn->Delete();
00094    GroupName->Delete();
00095    ddElem->Delete();
00096 }
00097 
00098 //-----------------------------------------------------------------------------
00099 // Public
00100 
00101 //-----------------------------------------------------------------------------
00102 // Protected
00103 
00104 //-----------------------------------------------------------------------------
00105 // Private
00106 
00107 //-----------------------------------------------------------------------------
00108 // Print
00109 
00110 //-----------------------------------------------------------------------------
00111 } // end namespace gdcm

Generated on Fri Jan 20 10:14:25 2006 for gdcm by  doxygen 1.4.4