[Insight-users] Filter buffers and memory limits
Dan Mueller
dan.muel at gmail.com
Fri Nov 21 12:01:35 EST 2008
Hi Urlek,
I don't know of any (concise) documentation regarding ITK's memory
management. Maybe you could start a wiki page with everything you've
learnt / will learn...?
Most filters allocate new memory for their outputs. See the
documentation/source for ImageSource::AllocateOutputs(.). There are
special "in place" filters which operate directly on the input memory
buffer (no new memory allocation). These filters inherit from
InPlaceImageFilter and can be activated by calling
filter->SetInPlaceOn(). Most pixel math filters (add, subtract,
shift/scale, etc) support in place.
Alternatively, if you need to limit memory usage, you may want to
investigate StreamingImageFilter:
http://www.itk.org/Doxygen/html/StreamingPage.html
http://www.itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html
Hope this helps.
Regards, Dan
2008/11/21 Urlek <crapie at email.si>:
>
> Hi,
>
> even when I push my big 3D images through through a fairly simple
> pipeline, the memory fingerprint of the process is several times bigger than
> what I would expect from the task. I guess filters are buffering the image
> as it passes through the pipeline so that multiple (different) copies reside
> in memory at any given time.
> How do you usually go about this, when available memory is a limit? Do
> you process the image in single steps, releasing filters once they have been
> used? Where could I read more on ITK's memory management and on how to
> optimally run a processing pipeline in memory-critical cases?
>
> Thanks a lot!
> --
> View this message in context: http://www.nabble.com/Filter-buffers-and-memory-limits-tp20624873p20624873.html
> Sent from the ITK - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
More information about the Insight-users
mailing list