[Insight-users] I have a problem in multiresolution mutual information registration

Luis Ibanez luis.ibanez at kitware.com
Thu Aug 3 17:50:51 EDT 2006


Hi Mohammad,


Processes in Windows 32 can only access 2GB of RAM, regardless
of how much memory is physically available in your machine.

This means that your program cannot use more than 2GB of RAM.

You may still be getting advantage of your 3GB if some other
programs use the remaining 1Gb.

Inside this constrain of 2GB you can reduce the memory consumption
by releasing memory from ITK filters as you go. The way of doing
this is to call the ReleaseDataFlagOn() in the ITK filters.

This will make that every filter will release the memory allocated
to its output image when the second filter downstream reports to be
done with its computation. The disadvantage of this approach is that
if you run the pipeline a second time, then the entire pipeline will
have to re-execute even if you only modified parameters on the filters
at the end of the pipeline.

A second, additional thing that you may want to try is to set some
filters to work in-place. Many (but not all) of the ITK filters allow
you to store the output image on the memory that used to belong to the
input image. You will have to check the documentation of the specific
filters that you are using in order to identify which ones can be run
in-place.


As a caution note, you should also consider the possibility that
a memory leak may be going on in your application. To discard this
possibility you may want to check with the Application Manager how
the memory consumption changes over time as you run your application.



    Regards,


       Luis



-----------------------
Mohammad Ya'qub wrote:
> Dear All,
>  
> I have a problem in the system that I am working on. The system we are 
> developing is for medical applications. We are using ITK 2.0, VTK 5, QT 
> 3.3.3 and building the system using VC++ 6.0. The operating system we 
> are using is Windows XP professional edition (32 bits). The system 
> becomes larger and larger because we are adding different modules to it 
> like segmentation, registration and many other modules. Now the system 
> is taking around 1.6 GB RAM (from the task manager) when running 
> some complicated operation. After having all modules together we got the 
> following problem:
> In multiresolution mutual information registration: when we run it on 
> large data sets it gives
> "itk::ExceptionObject (5B73FDD8)
> Location: "ImportImageContainer::AllocateElements"
> File: C:\Program 
> Files\ITK\include\InsightToolkit\Common\itkImportImageContainer.txx
> Line: 186
> Description: Failed to allocate memory for image"
>  
> My computer has 3GB RAM and I think it should not give this error. When 
> we also run it on small data sets it does not crash and later 
> "sometimes" when we run it again on large data set it gives output but 
> it shows the previous results from the small data set but later if 
> we restart the machine that error comes back while registering two large 
> data sets.
>  
> Thanks,
> 
> 
> *Mohammad Yaqub*
> *PhD Student, Computer Science Dept.*
> *Wayne State University, *
> *Detroit, MI 48202, US*
> 



More information about the Insight-users mailing list