20 from __future__
import print_function
22 import SimpleITK
as sitk
26 print(
"Usage: " + sys.argv[0] +
" <input-1> <input-2>")
35 joined_image = join.Execute(image_1, image_2)
39 channel1_image = select.Execute(joined_image, 0, sitk.sitkUInt8)
40 channel2_image = select.Execute(joined_image, 1, sitk.sitkUInt8)
41 channel3_image = select.Execute(joined_image, 2, sitk.sitkUInt8)
45 composed_image = compose.Execute(channel1_image, channel2_image,
49 sliced_image = composed_image[100:400, 100:400, 0]
53 extract.SetSize([300, 300, 0])
54 extract.SetIndex([100, 100, 0])
55 extracted_image = extract.Execute(composed_image)
61 crop.SetLowerBoundaryCropSize([100, 100, 0])
62 crop.SetUpperBoundaryCropSize([composed_image.GetWidth() - 400,
63 composed_image.GetHeight() - 400, 1])
64 cropped_image = crop.Execute(composed_image)