X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDictSet.cxx;h=1c3c0a7781af7f43b6126bb75acd3754b3854010;hb=dc0c43e2f7912a4a0f70fc7f925c964823468f23;hp=814ca802e223811cb31c608db41defeedf6d7bda;hpb=1aa2bb207fb6b9ce78f35e7547dd4c770e516adb;p=gdcm.git diff --git a/src/gdcmDictSet.cxx b/src/gdcmDictSet.cxx index 814ca802..1c3c0a77 100644 --- a/src/gdcmDictSet.cxx +++ b/src/gdcmDictSet.cxx @@ -1,3 +1,5 @@ +// gdcmDictEntry + #include #include // For getenv #include "gdcm.h" @@ -16,9 +18,13 @@ gdcmDictSet::gdcmDictSet(void) { void gdcmDictSet::SetDictPath(void) { const char* EnvPath = (char*)0; EnvPath = getenv("GDCM_DICT_PATH"); - if (EnvPath && (strlen(EnvPath) != 0)) + if (EnvPath && (strlen(EnvPath) != 0)) { DictPath = EnvPath; - else + if (DictPath[DictPath.length() -1] != '/' ) + DictPath += '/'; + dbg.Verbose(1, "gdcmDictSet::SetDictPath:", + "Dictionary path set from environnement"); + } else DictPath = PUB_DICT_PATH; } @@ -31,7 +37,7 @@ int gdcmDictSet::LoadDicomV3Dict(void) { int gdcmDictSet::LoadDictFromFile(string FileName, DictKey Name) { gdcmDict *NewDict = new gdcmDict(FileName.c_str()); dicts[Name] = NewDict; - return 0; + return 0; //FIXME if this is a dummy return make the method void } void gdcmDictSet::Print(ostream& os) {