]> Creatis software - gdcm.git/blobdiff - gdcmPython/__init__.py
* FIX : amelioration of code
[gdcm.git] / gdcmPython / __init__.py
index dcad484cb23efa8365c080bd12deb841451ba881..fcfd024ebb1ab4d60ffcd38b4989ed42cedf12a1 100644 (file)
@@ -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,15 @@ 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
 
-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()