X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=gdcmPython%2Fdemo%2FvtkGdcmReader.py.in;h=9070727d2506b37e5cd834d268c4a18b21dd88c6;hb=d93bdc3a545dc713354ab0c8ad9558ee11dfe0e9;hp=aea5e5c879fda132c0fb83fa2faa3a4b2e78ef93;hpb=f51f3cf0f4013935c1d93a828779e5ca285a31fc;p=gdcm.git diff --git a/gdcmPython/demo/vtkGdcmReader.py.in b/gdcmPython/demo/vtkGdcmReader.py.in index aea5e5c8..9070727d 100644 --- a/gdcmPython/demo/vtkGdcmReader.py.in +++ b/gdcmPython/demo/vtkGdcmReader.py.in @@ -1,3 +1,5 @@ +import sys +import os.path from gdcmConfigDemo import * from gdcmPython.vtk import * from vtkpython import * @@ -16,7 +18,9 @@ try: fileName = sys.argv[1] except IndexError: fileName = os.path.join(GDCM_DATA_ROOT, "test.acr") - + if( not os.path.isfile(fileName) ): + fileName=os.path.join(os.path.split(sys.argv[0])[0],"test.acr") + if( not os.path.isfile(fileName) ): PrintUse() sys.exit(1) @@ -36,7 +40,7 @@ viewer.SetColorLevel(0.5 * (rng[1] + rng[0])) dim = reader.GetOutput().GetDimensions() viewer.SetSize(dim[0],dim[1]) if(dim[2] != 1): - # For multifame dicom, take a snapshot of the center slice (+/- 1) + # For multiframe dicom, take a snapshot of the center slice (+/- 1) viewer.SetZSlice(dim[2] / 2) else: viewer.SetZSlice(0)