]> Creatis software - gdcm.git/blobdiff - gdcmPython/__init__.py
The shows goes on
[gdcm.git] / gdcmPython / __init__.py
index dcad484cb23efa8365c080bd12deb841451ba881..8a73b05ba4637b4c804b0f0ca876d3e38343a54a 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,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()