Failed to allocate memory for image.

218 views
Skip to first unread message

Sadegh Riyahi

unread,
Sep 5, 2015, 4:30:07 PM9/5/15
to Plastimatch
Hi Plastimatch community and Greg

I've tried to simply register the following two images:
Fixed: pixel size:0.00862mm isotropic, 8bit, matrix size: 900x600x1000
Moving: pixel size:0.02mm isotropic, 16bit , matrix size: 400x300x500
they are same subject and the same anatomical part of the body. I've done histogram matching to bring them to the same intensity distribution, however I didn't use normalized image filter since I'm using mse metric for now.
I tried plastimatch Bspline registration and I get the following error:
//////////////////////////////////////////////////
Loading fixed image: 20um-cropped.mha
Loading moving image: 8um_lightsource.mha
ITK exception reading image file: 8um_lightsource.mha!

itk::MemoryAllocationError (0028EC10)
Location: "short *__thiscall itk::ImportImageContainer<unsigned long,short>::All
ocateElements(unsigned long,bool) const"
File: d:\insighttoolkit-4.7.2\modules\core\common\include\itkImportImageContaine
r.hxx
Line: 199
Description: Failed to allocate memory for image.
//////////////////////////////////////////////

Following is Plastimatch command I use:

/////////////////////
[GLOBAL]
fixed=20um-cropped.mha
moving=8um_lightsource.mha
img_out=warped.mha
vf_out=vector_field.mha

[STAGE]
xform=bspline
optim=lbfgsb
impl=plastimatch
metric=mse
max_its=100
convergence_tol=5
grad_tol=1.5
res=4 4 2
grid_spac=3 3 3
regularization_lambda=0.00001
//////////////////////////////////

My PC has 64GB RAM, no other processes running. I was wondering, do you think it is really because the application cannot allocate the memory to the fixed image that could be a huge image (136MB) or there could be another problem?
I appreciate your help.

Thanks.
Sadegh

Sharp, Gregory C.

unread,
Sep 8, 2015, 11:52:17 AM9/8/15
to Plastimatch

Hi Sadegh,

 

Can you please confirm that you compiled as 64-bit application?

 

(Which compiler version did you use?)

 

Greg

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

The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

Sadegh Riyahi

unread,
Sep 8, 2015, 2:32:23 PM9/8/15
to plast...@googlegroups.com
Hi Greg,

Yes. I figured Plastimatch was compiled using MS visual studio 12, 32 bit, despite the machine is 64bit, so only 4GB memory was being allocated and it had problem opening the image. The same happened to ITK binaries. Now we're good.

Thanks
Sadegh
Reply all
Reply to author
Forward
0 new messages