[Insight-users] Memory usage in WrapITK

Борис Казаков boris.kazakov at gmail.com
Sat Jan 31 00:16:43 EST 2009


Hi,
I have tested the following example, written in python using wrapitk:

import numpy as np
import itk
itk.auto_progress(2)

image_type = itk.Image.F3
duplicator = itk.ImageDuplicator[image_type].New()
filter_type = itk.RecursiveGaussianImageFilter[image_type, image_type]
reader = itk.ImageFileReader[image_type].New()
reader.SetFileName('/home/borsh/test/im1.jpg')
for i in range(400):
    print i
    ga = filter_type.New()
    gb = filter_type.New()
    ga.SetDirection(0)
    gb.SetDirection(1)
    ga.SetZeroOrder()
    gb.SetZeroOrder()

    ga.SetInput(reader.GetOutput())
    gb.SetInput(ga.GetOutput())
    duplicator.SetInputImage(gb.GetOutput())
    gb.Update()

With each iteration of outer loop the memory usage of the python process
increases. Am I doing something wrong or is there a memory leak in wrapitk?

Best regards,
Boris Kazakov.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090131/50007a0b/attachment.htm>


More information about the Insight-users mailing list