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

Cyril cyril.mory at philips.com
Fri Apr 19 07:57:14 EDT 2013


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.


More information about the Insight-users mailing list