]> Creatis software - gdcm.git/blobdiff - gdcmPython/demo/testAll.py
* gdcmPython/setup.py and distutilsSwigCPlusPlus.py added. The
[gdcm.git] / gdcmPython / demo / testAll.py
index 682742626c8c47d6d6247383c177827cfcd59d29..e46fda0677af64fee587a02f840561b6cb6146b6 100644 (file)
@@ -1,7 +1,6 @@
-from load import *
+from gdcmPython import *
 
-# Where all the test images are
-TestFileDir =  os.path.join("..", "..", "Data")
+# Test each file of the Data directory
 
 AllFiles = [
        "CR-MONO1-10-chest.dcm",
@@ -28,11 +27,10 @@ AllFiles = [
 
 if __name__ == '__main__':
        for file in AllFiles:
-               fileName = os.path.join(TestFileDir, file)
+               fileName = os.path.join(GDCM_DATA_PATH, file)
                print "############## file :", fileName
-               toRead = gdcm.gdcmHeader(fileName)
+               toRead = gdcmHeader(fileName)
                toRead.LoadElements()
                ValDict = toRead.GetPubElVal()
                for key in ValDict.keys():
                        print "   [%s] = [%s]" %(key, ValDict[key])
-