[elastix] Error reducing BSpline grid and question about regularization

Andrés Méndez andres.mendezg at gmail.com
Thu Aug 18 11:04:44 CEST 2011


Hello everyone

I'm trying to do a multimodality breast registration  (T1 + DWI) in two
stages: first an affine registration to match the general forms and then,
using a mask on the fixed image, a B-Spline  registration as a refinement
focused on the tumoral area.  I have two issues:

1) I have succesfully tried many BSpline grids, ranging from 4 to 15mm,
without problem whatsoever. The problem arises when I try to reduce the grid
to 3 or 2 mm, in both cases I get the following error:


 itk::ExceptionObject (00000000009BF8F0)
Location: "ElastixTemplate - Run()"
File:
d:\toolkits\itk\3.20.0\insighttoolkit-3.20.0\code\common\itkImportImageContainer.txx
Line: 188
Description: Failed to allocate memory for image.

Error occurred during actual registration.

Do you have any suggestion how to solve it?  I copy the parameter file at
the end of the email.



2)The second issue is more an open question. I intend to do tests including
a regularization term to limit the ammount of deformation. In the first test
I got exactly the same result as without regularization. What default values
do you suggest as a starting point (if any)?  The way I use it is as follows
(is it correct?):

(Registration "MultiMetricMultiResolutionRegistration")
(Metric  "NormalizedMutualInformation" "TransformRigidityPenalty")
(UseRelativeWeights "true")
(Metric0Weight 1)
(Metric1Weight 0.1)

The rest of the parameters are the same as in the parameter file (just
changing the grid size)


Parameter file:


=============== start of ParameterFile:
D:\RegistrationIEO\tests\parameters\BSpline_2mm.txt ===============

// ************************** Image Types

(FixedInternalImagePixelType "float")
(MovingInternalImagePixelType "float")
(FixedImageDimension 3)
(MovingImageDimension 3)



//*************************** Components

(Registration "MultiResolutionRegistration")
(FixedImagePyramid "FixedSmoothingImagePyramid")
(MovingImagePyramid "MovingSmoothingImagePyramid")
(Interpolator "BSplineInterpolator")
(Metric "NormalizedMutualInformation" )
(Optimizer "AdaptiveStochasticGradientDescent")
(ResampleInterpolator "FinalBSplineInterpolator")
(Resampler "DefaultResampler")
(Transform "BSplineTransform")



//*************************** Resolutions

(NumberOfResolutions 4)
(ImagePyramidSchedule 8 8 8 4 4 4  2 2 2  1 1 1 )


// ************************** Transformation

(FinalGridSpacingInPhysicalUnits 2.0 2.0 2.0)
(GridSpacingSchedule 8.0 4.0 2.0 1.0)
(HowToCombineTransforms "Compose")
(BSplineTransformSplineOrder 3)
(AutomaticScalesEstimation "true")
(AutomaticTransformInitialization "true")


// ************************** etc

(NumberOfHistogramBins 32)
(ErodeMask "false" "false" "false" )
(UseDirectionCosines "true")

(WriteResultImage "true")
(ResultImagePixelType "short")
(ResultImageFormat "nii")



// ************************** Optimizer

(MaximumNumberOfIterations 1000)
(AutomaticParameterEstimation "true")
(UseAdaptiveStepSizes "true")


// ************************** Image sampling

(ImageSampler "RandomCoordinate")
(NumberOfSpatialSamples 2048)
(NewSamplesEveryIteration "true")
(MaximumNumberOfSamplingAttempts 30)



// ************************** Interpolation and Resampling

(BSplineInterpolationOrder 1)
(FinalBSplineInterpolationOrder 3)
(DefaultPixelValue 0)

===========================================================



 Thank you very much for your attention. Best regards.


Andrés Méndez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bigr.nl/pipermail/elastix/attachments/20110818/7b6a523f/attachment.html>


More information about the Elastix mailing list