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