24 from distutils.version
import StrictVersion
as VS
26 print(
"ITK 4.10.0 is required.")
29 if len(sys.argv) != 2:
30 print(
'Usage: ' + sys.argv[0] +
' <NumberOfSplits>')
32 numberOfSplits = int(sys.argv[1])
36 ImageType =
itk.Image[PixelType, Dimension]
40 size.Fill(numberOfSplits)
44 monitorFilter.SetInput(source.GetOutput())
47 streamingFilter.SetInput(monitorFilter.GetOutput())
48 streamingFilter.SetNumberOfStreamDivisions(numberOfSplits)
50 streamingFilter.Update()
52 print(
'The output LargestPossibleRegion is: ' +
53 str(streamingFilter.GetOutput().GetLargestPossibleRegion()))
57 updatedRequestedRegions = monitorFilter.GetUpdatedRequestedRegions()
58 print(
"Updated RequestedRegion's:")
59 for ii
in range(len(updatedRequestedRegions)):
60 print(
' ' + str(updatedRequestedRegions[ii]))