20 import SimpleITK
as sitk
23 grid_image =
sitk.GridSource(outputPixelType=sitk.sitkUInt16, size=(512,512),
24 sigma=(0.1,0.1), gridSpacing=(20.0,20.0))
28 sitk.Show(grid_image, title =
"grid using Show function", debugOn =
True)
32 image_viewer.SetTitle(
'grid using ImageViewer class')
35 image_viewer.Execute(grid_image)
38 image_viewer.SetApplication(
'/Applications/ITK-SNAP.app/Contents/MacOS/ITK-SNAP')
39 image_viewer.Execute(grid_image)
42 image_viewer.SetCommand(
'/Applications/ITK-SNAP.app/Contents/MacOS/ITK-SNAP -z 2')
43 image_viewer.Execute(grid_image)