Error: failed to allocate memory from image

1,209 views
Skip to first unread message

Tara Smit

unread,
Nov 15, 2017, 12:00:37 PM11/15/17
to itksnap-users
Hi all,

With some images in ITK-snap I get the error "failed to allocate memory from image".
It occurs when I try to load a layer on top of my main image.
Both in version 3.2.0 and 3.6.0.
Some images don't give the error and thus are working fine.

I guess it has something to do with the size of the images.
But that doesn't sound logical since my C-disk has plenty of space left.

Does someone know what is going wrong here?

Cook, Philip

unread,
Nov 15, 2017, 12:22:58 PM11/15/17
to itksna...@googlegroups.com
The limitation is RAM, not the disk space. The older version might also be compiled for 32-bit systems, which further limits the available memory. The 3.6.0 version should be 64-bit.

Virtual machines and shared computing environments commonly limit memory consumption. This could cause the error to arise sporadically depending on what other processes you're running.

What OS are you on, and how much RAM is there? What are the dimensions of the images?


--
You received this message because you are subscribed to the Google Groups "itksnap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to itksnap-user...@googlegroups.com.
To post to this group, send email to itksna...@googlegroups.com.
Visit this group at https://groups.google.com/group/itksnap-users.
For more options, visit https://groups.google.com/d/optout.

Tara Smit

unread,
Nov 16, 2017, 7:20:35 AM11/16/17
to itksnap-users
I'm on Windows 10 and have 64.0 GB RAM-memory.

The images are 512 - 512 - 402/502 in dimension.
The layers I try to load range from somwhere around 8 MB until 150 MB.
The main images are somewhere around 500 MB each.

Op woensdag 15 november 2017 18:22:58 UTC+1 schreef Philip Cook:

Paul Yushkevich

unread,
Nov 20, 2017, 2:04:16 PM11/20/17
to itksna...@googlegroups.com
I recall that on 64 bit Windows, there are still some limitations on the size of memory that can be allocated as a contiguous block - something like 2GB. If that is correct, it may explain what is happening here. Tara, if you could test with somewhat smaller sized images whether the same problem occurs, that would be very informative.

Thank you
Paul

To unsubscribe from this group and stop receiving emails from it, send an email to itksnap-users+unsubscribe@googlegroups.com.

To post to this group, send email to itksna...@googlegroups.com.
Visit this group at https://groups.google.com/group/itksnap-users.
For more options, visit https://groups.google.com/d/optout.



--
Paul A. Yushkevich, Ph.D.
Associate Professor
Penn Image Computing and Science Laboratory
Department of Radiology
University of Pennsylvania

Tara Smit

unread,
Nov 20, 2017, 4:16:40 PM11/20/17
to itksnap-users
Hi Paul,

I saw that error is occurring only with the larger sized images indeed. It's starting to error with image layers feom around 130 MB or higher. And the main image is already loaded ofcourse.

Is there some way I can bypass this problem? Currently new to this field en using these kind of programs.

Thanks in advance.

Paul Yushkevich

unread,
Nov 21, 2017, 11:04:56 AM11/21/17
to itksna...@googlegroups.com
Tara

Could you try using a Mac? Or installing Linux (Ubuntu or Debian) on your machine in a dual-boot setting? In general, I believe that Linux will be more powerful in allowing you to do processing of large datasets.

Best
Paul

--
You received this message because you are subscribed to the Google Groups "itksnap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to itksnap-users+unsubscribe@googlegroups.com.
To post to this group, send email to itksna...@googlegroups.com.
Visit this group at https://groups.google.com/group/itksnap-users.
For more options, visit https://groups.google.com/d/optout.

Tara Smit

unread,
Nov 23, 2017, 11:06:45 AM11/23/17
to itksnap-users
Hi Paul,

I just tried to load the segmentations on a Mac computer, but it didn't work there either. The Mac computer only had version 3.6.0 ITK-snap installed. In Windows the 3.6.0 didn't show any segmentation at all, so that might be the same problen wirh the Mac. I use 3.2.0 on Windows most of the time.

I had a limited amount of time today but I'll see if I can create a virtual machine with Linux tomorrow.

Greetings Tara

Tara Smit

unread,
Nov 27, 2017, 9:30:28 AM11/27/17
to itksnap-users
I installed Ubuntu on a Virtual Machine and tried to load the segmentation layers that didn't work in Windows.
Got the same problem there...
For every segmentation layer I got the same orientation as the main image, so that can't be the problem.

The segmentation layers that give the error have the sizes: 502, 502, 502, 668, 502, 668 MB.

Op woensdag 15 november 2017 18:00:37 UTC+1 schreef Tara Smit:
Message has been deleted

Tara Smit

unread,
Nov 27, 2017, 10:27:01 AM11/27/17
to itksnap-users
Needed to assign more available data to the Virtual Machine and now everything works.
For the future readers with the same problem, I use:
- ITKsnap 3.6.0
- Ubuntu 16.04 LTS

Thankyou Philip and Paul for helping!


Op woensdag 15 november 2017 18:00:37 UTC+1 schreef Tara Smit:
Hi all,
Reply all
Reply to author
Forward
0 new messages