20 parser = argparse.ArgumentParser(description=
"Write An Image.")
21 parser.add_argument(
"output_image", nargs=
"?")
22 args = parser.parse_args()
25 output_filename = args.output_image
27 output_filename =
"testPython.png"
31 image_type =
itk.Image[pixel_type, dimension]
41 region.SetIndex(start)
44 image = image_type.New(Regions=region)
47 itk.imwrite(image, output_filename)