20 from __future__
import print_function
22 import SimpleITK
as sitk
26 if len ( sys.argv ) < 4:
27 print(
"Usage: SimpleGaussian <input> <sigma> <output>" )
32 reader.SetFileName ( sys.argv[1] )
33 image = reader.Execute()
35 pixelID = image.GetPixelID()
38 gaussian.SetSigma ( float ( sys.argv[2] ) )
39 image = gaussian.Execute ( image )
42 caster.SetOutputPixelType( pixelID )
43 image = caster.Execute( image )
46 writer.SetFileName ( sys.argv[3] )
47 writer.Execute ( image );
50 if (
not "SITK_NOSHOW" in os.environ ):