X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmUtil.cxx;h=faad02548843d592f30abff1a2bfc3bdb439a2f2;hb=7b8dcad5fbb9b248952ad6819ef984e7880ef81e;hp=fb1f87fb248565e7647eb571759083d65cd66a4e;hpb=bfbd90327a5e45d972546843b0d9e4185e16cb24;p=gdcm.git diff --git a/src/gdcmUtil.cxx b/src/gdcmUtil.cxx index fb1f87fb..faad0254 100644 --- a/src/gdcmUtil.cxx +++ b/src/gdcmUtil.cxx @@ -52,23 +52,26 @@ void gdcmDebug::Exit(int a) { } //----------------------------------------------------------------------------- -gdcmVR *gdcmGlobal::VR = (gdcmVR *)0; -gdcmTS *gdcmGlobal::TS = (gdcmTS *)0; -gdcmDictSet *gdcmGlobal::Dicts = (gdcmDictSet *)0; +gdcmDictSet *gdcmGlobal::Dicts = (gdcmDictSet *)0; +gdcmVR *gdcmGlobal::VR = (gdcmVR *)0; +gdcmTS *gdcmGlobal::TS = (gdcmTS *)0; +gdcmDicomDirElement *gdcmGlobal::ddElem = (gdcmDicomDirElement *)0; gdcmGlobal gdcmGlob; gdcmGlobal::gdcmGlobal(void) { if (VR || TS || Dicts) dbg.Verbose(0, "gdcmGlobal::gdcmGlobal : VR or TS or Dicts already allocated"); + Dicts = new gdcmDictSet(); VR = new gdcmVR(); TS = new gdcmTS(); - Dicts = new gdcmDictSet(); + ddElem = new gdcmDicomDirElement(); } gdcmGlobal::~gdcmGlobal() { + delete Dicts; delete VR; delete TS; - delete Dicts; + delete ddElem; } gdcmVR *gdcmGlobal::GetVR(void) { @@ -83,6 +86,10 @@ gdcmDictSet *gdcmGlobal::GetDicts(void) { return Dicts; } +gdcmDicomDirElement *gdcmGlobal::GetDicomDirElements(void) { + return ddElem; +} + //----------------------------------------------------------------------------- // Because is not yet available in g++2.96 std::istream& eatwhite(std::istream& is) {