X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=gdcmPython%2F__init__.py;h=4b2b8cc6ee5383b997132f2303161bf3437c5188;hb=933fb20f37f5f900c53c59b2a739e18303bd60d8;hp=7d6390e70f892dcbc3bb862a1355b81caa2f21d9;hpb=bafdfafe6c1b30607035fc4018c0405169b348e8;p=gdcm.git diff --git a/gdcmPython/__init__.py b/gdcmPython/__init__.py index 7d6390e7..4b2b8cc6 100644 --- a/gdcmPython/__init__.py +++ b/gdcmPython/__init__.py @@ -53,9 +53,14 @@ except KeyError: print "Path to dictionaries is mandatory. Exiting" sys.exit(1) os.environ["GDCM_DICT_PATH"] = Path +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" @@ -70,13 +75,21 @@ except ImportError,e: raise ImportError, "gdcm extension not imported." ### Expose only the necessary stuff -gdcmDictSet = gdcm.gdcmDictSet -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 -def GetPubDictTagNames(): - return gdcm.cvar.gdcmGlob.GetDicts().GetPubDictTagNames() +gdcmDicomDirMeta = gdcm.gdcmDicomDirMeta +gdcmDicomDirPatient = gdcm.gdcmDicomDirPatient +gdcmDicomDirStudy = gdcm.gdcmDicomDirStudy +gdcmDicomDirSerie = gdcm.gdcmDicomDirSerie +gdcmDicomDirImage = gdcm.gdcmDicomDirImage -def GetPubDictTagNamesByCategory(): - return gdcm.cvar.gdcmGlob.GetDicts().GetPubDictTagNamesByCategory() +def GetPubDictEntryNames(): + return gdcmGlobal.GetDicts().GetPubDictEntryNames() + +def GetPubDictEntryNamesByCategory(): + return gdcmGlobal.GetDicts().GetPubDictEntryNamesByCategory()