20 from distutils.version
import StrictVersion
as VS
22 print(
"ITK 4.10.0 is required.")
25 if len(sys.argv) != 2:
26 print(
'Usage: ' + sys.argv[0] +
' <NumberOfSplits>')
28 numberOfSplits = int(sys.argv[1])
32 ImageType =
itk.Image[PixelType, Dimension]
36 size.Fill(numberOfSplits)
40 monitorFilter.SetInput(source.GetOutput())
43 streamingFilter.SetInput(monitorFilter.GetOutput())
44 streamingFilter.SetNumberOfStreamDivisions(numberOfSplits)
46 streamingFilter.Update()
48 print(
'The output LargestPossibleRegion is: ' +
49 str(streamingFilter.GetOutput().GetLargestPossibleRegion()))
53 updatedRequestedRegions = monitorFilter.GetUpdatedRequestedRegions()
54 print(
"Updated RequestedRegion's:")
55 for ii
in range(len(updatedRequestedRegions)):
56 print(
' ' + str(updatedRequestedRegions[ii]))