X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=gdcmPython%2F__init__.py;h=4b2b8cc6ee5383b997132f2303161bf3437c5188;hb=45490622810d0706cb4ec538634c4a886f39737b;hp=fcfd024ebb1ab4d60ffcd38b4989ed42cedf12a1;hpb=4a07b1470f68d316f570fef1f07b9f9c77e90ee1;p=gdcm.git diff --git a/gdcmPython/__init__.py b/gdcmPython/__init__.py index fcfd024e..4b2b8cc6 100644 --- a/gdcmPython/__init__.py +++ b/gdcmPython/__init__.py @@ -56,7 +56,11 @@ except KeyError: GDCM_DICT_PATH = os.environ["GDCM_DICT_PATH"] ### Set up the path to the data images for the demos. -GDCM_DATA_PATH = BuildInstallOrPreinstallPath("Test", "test.acr") +if os.environ["GDCM_DATA_PATH"]: + GDCM_DATA_PATH = BuildInstallOrPreinstallPath(os.environ["GDCM_DATA_PATH"], + "test.acr") +else: + GDCM_DATA_PATH = BuildInstallOrPreinstallPath("Test", "test.acr") if not GDCM_DATA_PATH: print "GDCM_DATA_PATH is not setup properly: unfound Test directory" @@ -71,15 +75,21 @@ except ImportError,e: raise ImportError, "gdcm extension not imported." ### Expose only the necessary stuff -gdcmGlobal = gdcm.gdcmGlobal -gdcmDictSet = gdcm.gdcmDictSet -gdcmDicomDir = gdcm.gdcmDicomDir -gdcmHeader = gdcm.gdcmHeader -gdcmHeaderHelper = gdcm.gdcmHeaderHelper -gdcmFile = gdcm.gdcmFile +gdcmGlobal = gdcm.gdcmGlobal +gdcmDictSet = gdcm.gdcmDictSet +gdcmDicomDir = gdcm.gdcmDicomDir +gdcmHeader = gdcm.gdcmHeader +gdcmHeaderHelper = gdcm.gdcmHeaderHelper +gdcmFile = gdcm.gdcmFile + +gdcmDicomDirMeta = gdcm.gdcmDicomDirMeta +gdcmDicomDirPatient = gdcm.gdcmDicomDirPatient +gdcmDicomDirStudy = gdcm.gdcmDicomDirStudy +gdcmDicomDirSerie = gdcm.gdcmDicomDirSerie +gdcmDicomDirImage = gdcm.gdcmDicomDirImage def GetPubDictEntryNames(): - return gdcm.cvar.gdcmGlob.GetDicts().GetPubDictEntryNames() + return gdcmGlobal.GetDicts().GetPubDictEntryNames() def GetPubDictEntryNamesByCategory(): - return gdcm.cvar.gdcmGlob.GetDicts().GetPubDictEntryNamesByCategory() + return gdcmGlobal.GetDicts().GetPubDictEntryNamesByCategory()