[Insight-users] Failed to allocate memory for image

Dženan Zukić dzenanz at gmail.com
Tue Jul 20 09:00:08 EDT 2010


Hi Sara,

I don't know whether this is the same or different problem, but when I tried
to do something with similarly large image (512x512x497), using double
precision internally (nearly 2GB), it constantly failed to allocate on
32-bit system, even though I had enough free memory. After spending some
time trying to figure out what was going on, I concluded that the image
fails to allocate because my memory space was fragmented - even though there
was enough free memory overall, there was no free block large enough into
which my image would fit. This problem is resolved by switching to 64bit
OS+app.

Regards,
Dženan

On Tue, Jul 20, 2010 at 01:45, Sara Rolfe <smrolfe at u.washington.edu> wrote:

> Hello,
>
> I am having trouble trying to resize a volume using SubsampleVolume.cxx
> from the /Examples/Filtering directory.  After checking the mail archives, I
> added filter->SetReleaseDataFlag( true ); to each of the filters.  I then
> replaced the RecursiveGaussianImageFilter with the
> GradientMagnitudeImageFilter since it requires less memory.  These fixes did
> not solve my problem.  I next commented out one filter at a time and found
> that I get the memory error when I include the ImageFileReader,
> CastImageFilter, and GradientMagnitudeImageFilter.
>
> Could you suggest any further fixes?  I am working on a Mac with 2G of
> memory.  The image I'm working with is 402 MB (1024x1024x402).
>
> _____________________________________
> 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.html
>
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100720/b9b95c03/attachment-0001.htm>


More information about the Insight-users mailing list