20 from __future__
import print_function
23 import SimpleITK
as sitk
26 print(
'Wrong number of arguments.', file=sys.stderr)
27 print(
'Usage: ' + __file__ +
' image_file_name', file=sys.stderr)
32 image_ios_tuple = file_reader.GetRegisteredImageIOs()
33 print(
"The supported image IOs are: " + str(image_ios_tuple))
43 file_reader.SetImageIO(
'PNGImageIO')
44 file_reader.SetFileName(sys.argv[1])
46 image = file_reader.Execute()
47 print(
'Read image: ' + sys.argv[1])
48 except Exception
as err:
49 print(
'Reading failed: ', err)