[Insight-users] RE: question of the memory

Miller, James V (Research) millerjv at crd.ge.com
Tue, 10 Feb 2004 14:02:18 -0500


Under the best of circumstances, an image pyramid should only require
double the amount of storage as the high resolution image.  If a five level
pyramid is taking 5X the storage, then we are probably not releasing all 
the memory that we could during the pyramid construction.

I had noticed that the image pyramid pre-calculated all the levels prior to 
registration.  I agree with Luis, that we should be able to construct the
system such each level is generated (and released) on demand.  I would 
guess that we could do this while maintaining the backward compatibility
(or backward behavior).

Jim



-----Original Message-----
From: Luis Ibanez [mailto:luis.ibanez at kitware.com]
Sent: Tuesday, February 10, 2004 1:57 PM
To: Tina Wang
Cc: Insight-users at itk.org; Lydia Ng; Miller, James V (Research)
Subject: Re: question of the memory



Hi Tina,

There have been some recent developments in ITK
for reducing the memory footprint of a number of
filters.

Many filters are now allowed to reuse the memory of
the input image. They are called 'inplace' filters.

The smoothing filters used for the multi-resolution
pyramid will be able to take advantage of this
functionality.


When you select 5 levels of the multi-resolution
pyramid. The images corresponding to all of the
levels are computed before the registration
process starts. However, for the registration
itself, only one level is used as a time. An
interesting modification to explore is to compute
the levels only on demand (e.g. only when the
registration method needs them) and discard the
memory of levels that have already been used for the
registration.

An easy way of checking if that may be enough for
your current problem is to set only two levels in
the pyramid and set them to the two finer resolutions
you currently have.  If that fits in memory, the
computation of one level at a time will probably
help in you case too.


Regards,


   Luis


-----------------
Tina Wang wrote:

> Luis,
>  
> I am using MultiResolutionImageRegistrationMethod to register two CT 
> images with image size over 100mb of each. I am running out of memory 
> and the program aborted at the step of "PreparePyramids". If I use five 
> levels of data structure, the program will allocate 5 x100mb memory 
> space for each image and this will exaused all my RAM.
> What is the best way to avoid using so much memory and keep the 
> program running? 
>  
> Thanks,
>  
> Tina
> 
>      
> 
> ------------------------------------------------------------------------
> Do you Yahoo!?
> Yahoo! Finance: Get your refund fast by filing online 
> <http://us.rd.yahoo.com/evt=22055/*http://taxes.yahoo.com/filing.html>