[Insight-users] memory allocation issue in deformable registration

John Drescher drescherjm at gmail.com
Fri May 11 10:52:38 EDT 2012


On Fri, May 11, 2012 at 10:48 AM, Wenwu <cool.wenwu at gmail.com> wrote:
> Hi all,
>
> Now I want to do deformable image registration of liver using CT image data.
>
> The registration process is : rigid registration-> affine
> registration->deformable registraion coase->deformable registration fine.
>
> Main itk classes we use are as following:
> itk::ImageRegistrationMethod
> itk::
> MattesMutualInformationImageToImageMetric
> itk::LinearInterpolateImageFunction
> itk::CenteredTransformInitializer
> itk::VersorRigid3DTransform
> itk::AffineTransform
> itk::BSplineDeformableTransform
> itk::RegularStepGradientDescentOptimizer
>
> The itk version is itk3.2.
>
> Now the issue is that when program run into the "deformable registration
> fine" step, the memory allocation error occurs.
>
> The error information is :
>  [SLM] FATAL - error itk::ExceptionObject (0018B76C)
> Location: "float *__thiscall itk::ImportImageContainer<unsigned
> long,float>::AllocateElements(unsigned long) const"
> File:
> d:\fw4spl\binpkgs\debug32\itk_3-20-0_win_32_cl9-0_d\include\insighttoolkit\common\itkImportImageContainer.txx
> Line: 188
> Description: Failed to allocate memory for image.
>
>
> Then I debug and explore the source code, found that the registration object
> call 8 threads to calculate the metric, it makes large memory cost, so i set
> the number of threads to 1. And the progam can work. but once I increase the
> size of the data, the program is in crash again, can anyone give some
> suggestion?  thanks in advance!
>
>
> The property of CT image :
> Image size: 351*281*242,
> Voxel size:     0.961*0.961*1.8
> Both of fixed image and moving image have  same property.
>
>

Is this 32 bit windows? If so the maximum allocation is around 1.2GB I
am sure with your float image and more than 1 copy you are over that..
Also you will be limited to 2GB total address space unless you use the
LARGEADDRESSAWARE link flag.

John


More information about the Insight-users mailing list