X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=gdcmPython%2F__init__.py;h=8a73b05ba4637b4c804b0f0ca876d3e38343a54a;hb=5154dc89c0a2a565e9e79024ba8910f405279dd2;hp=dcad484cb23efa8365c080bd12deb841451ba881;hpb=ebee24c21fea75fcb7d0e4479cf72072fe6775f1;p=gdcm.git diff --git a/gdcmPython/__init__.py b/gdcmPython/__init__.py index dcad484c..8a73b05b 100644 --- a/gdcmPython/__init__.py +++ b/gdcmPython/__init__.py @@ -1,5 +1,10 @@ import os, sys +try: + from gdcmVersion import * +except: + print "gdcmVersion not imported" + def BuildInstallOrPreinstallPath(DirName, FileName = None): # Builds a path to the DirName directory. This should work both when: # - the package is properly installed in which case DirName is a subdir @@ -48,6 +53,7 @@ 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") @@ -65,12 +71,21 @@ except ImportError,e: raise ImportError, "gdcm extension not imported." ### Expose only the necessary stuff -gdcmHeader = gdcm.gdcmHeader -gdcmDictSet = gdcm.gdcmDictSet -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 GetPubDictTagNames(): - return gdcm.cvar.gdcmGlob.GetDicts().GetPubDictTagNames() +def GetPubDictEntryNames(): + return gdcm.cvar.gdcmGlob.GetDicts().GetPubDictEntryNames() -def GetPubDictTagNamesByCategory(): - return gdcm.cvar.gdcmGlob.GetDicts().GetPubDictTagNamesByCategory() +def GetPubDictEntryNamesByCategory(): + return gdcm.cvar.gdcmGlob.GetDicts().GetPubDictEntryNamesByCategory()