24 import SimpleITK
as sitk
27 print(
"Usage: SimpleGaussian <input> <sigma> <output>")
31 reader.SetFileName(sys.argv[1])
32 image = reader.Execute()
34 pixelID = image.GetPixelID()
37 gaussian.SetSigma(float(sys.argv[2]))
38 image = gaussian.Execute(image)
41 caster.SetOutputPixelType(pixelID)
42 image = caster.Execute(image)
45 writer.SetFileName(sys.argv[3])
48 if "SITK_NOSHOW" not in os.environ: