20 from __future__
import print_function
22 import SimpleITK
as sitk
25 xImg =
sitk.Image( 256, 256, sitk.sitkFloat32 )
26 yImg =
sitk.Image( 256, 256, sitk.sitkFloat32 )
28 for y
in range( 0, xImg.GetSize()[1] ):
29 for x
in range( 0, xImg.GetSize()[0] ):
30 xImg.SetPixel( x, y, x )
37 yImg = yImg - yImg.GetSize()[1] / 2
39 gaussianImg =
sitk.Exp( -1 * (xImg**2 + yImg**2) / (2.0 * sigma**2) )
42 if (
not "SITK_NOSHOW" in os.environ ):