21 from distutils.version
import StrictVersion
as VS
24 print(
"ITK 4.10.0 is required.")
27 parser = argparse.ArgumentParser(description=
"Stream A Pipeline.")
28 parser.add_argument(
"number_of_splits", type=int)
29 args = parser.parse_args()
33 ImageType =
itk.Image[PixelType, Dimension]
37 size.Fill(args.number_of_splits)
41 monitorFilter.SetInput(source.GetOutput())
44 streamingFilter.SetInput(monitorFilter.GetOutput())
45 streamingFilter.SetNumberOfStreamDivisions(args.number_of_splits)
47 streamingFilter.Update()
50 "The output LargestPossibleRegion is: "
51 + str(streamingFilter.GetOutput().GetLargestPossibleRegion())
56 updatedRequestedRegions = monitorFilter.GetUpdatedRequestedRegions()
57 print(
"Updated ApplyAFilterOnlyToASpecifiedImageRegion's:")
58 for ii
in range(len(updatedRequestedRegions)):
59 print(
" " + str(updatedRequestedRegions[ii]))