]> Creatis software - gdcm.git/blobdiff - gdcmPython/__init__.py
* Bugs fix for the Windows build with VC6
[gdcm.git] / gdcmPython / __init__.py
index fcfd024ebb1ab4d60ffcd38b4989ed42cedf12a1..4b2b8cc6ee5383b997132f2303161bf3437c5188 100644 (file)
@@ -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()