[Insight-users] My filters do not release their output data correctly

Bradley Lowekamp blowekamp at mail.nih.gov
Fri Apr 19 08:10:24 EDT 2013


Hello Cyril.

Very hard to to give suggestions of what may be wrong in your filter classes with out seeing the code :)

Are they perhaps composite filters? That is filters made up of other filters? While these types are the easies to write, they are the hardest to get all of the pipeline features working correctly.

Perhaps you allocated filters internal to your filter and they have been allocated as IVARs in the filter and are not deleted after execute?

Just guessing here....
Brad


On Apr 19, 2013, at 7:57 AM, Cyril <cyril.mory at philips.com> wrote:

> Hi everyone,
> 
> I'm building an application with a long pipeline. Some of the filters are
> original ITK filters (addImageFilter, multiplyImageFilter, ...), the rest
> are "homemade" filters. 
> When I set the ReleaseDataFlag to true on the original ITK filters, and
> monitor memory usage using probes, they seem to release their output data at
> the right moment (right after the next filter in the pipeline has been
> updated) and free the memory. When, on the other hand, I set the
> ReleaseDataFlag to true on the filters I have written myself, they just do
> not release anything. Manually calling ReleaseData() on the output of these
> filters does not have any effect either.
> 
> Is there something specific to do so that an ImageToImageFilter releases its
> output data correctly ? I've read on another post that in composite filters,
> the ReleaseDataFlag should be passed to the internal filters. But what if
> the filters I've written are not composite, and use iterators to compute
> their output ? 
> 
> Just in case it matters : I've written the "homemade" filters in a different
> namespace (not itk, but rtk, a tomography framework based on itk). I do not
> have a clue whether it matters or not.
> 
> Looking forward to reading your answers,
> Cyril
> 
> 
> 
> --
> View this message in context: http://itk-users.7.n7.nabble.com/My-filters-do-not-release-their-output-data-correctly-tp31213.html
> Sent from the ITK - Users mailing list archive at Nabble.com.
> _____________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
> 
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list