how to use image streaming to reduce memory usage and cpu usage in image stitching

replace

resampleF.Update()

by

writer = itk.ImageFileWriter.New(resampleF.GetOutput().astype(itk.RGBPixel[itk.UC]))
writer.SetFileName(out_file)
writer.SetNumberOfStreamDivisions(5)
writer.Update()

it works great for me, the memory usage line no waves like nothing happened
1645096260(1)
and the total process time is really quick, 160 tiles for 30.11 seconds
image

1 Like