[Elastix] binary image registration

S. Klein s.klein at erasmusmc.nl
Fri Apr 3 20:04:12 CEST 2015

Dear Tiantian,
I recommend you set the BSplineInterpolationOrder to 1. The current setting of 3 will introduce overshoot on a binary image. The BSplineInterpolationOrder is the interpolation order used during registration. The FinalBSplineInterpolationOrder should be set to 0 for binary images. That setting does not affect the registration accuracy, just the final warping.

On 17-03-2015 10:54, litiantian wrote:
Dear Sir/Mandam,

i came across a problem when i tried to register the binary image(segmentation result).
In my application, i segment out the organ from the wholebody image of 5 time points,and then register them to one fixed image. if i set (FinalBSplineInterpolationOrder 1) ,there will exist many  interpolation value on the margin of the organ after registration which is not be expected. In order to solve this, I set (FinalBSplineInterpolationOrder 0). But the performance of registration algorithm was too worse. So, could you give me some suggest setting on the binary image registration and have no interpolation value on the margin of the organ at the same time ?

I would be appreciate if i can get any help from you!
Thank you very much!!


Here is my Parameter file i used now:

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

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

// ********** Pyramid

// Total number of resolutions
(NumberOfResolutions 2)

// ********** Transform
// ********** Transform

(FinalGridSpacingInPhysicalUnits 4.0 4.0 4.0)
(GridSpacingSchedule 1.0 1.0 1.0 1.0 1.0 1.0)
(HowToCombineTransforms "Compose")

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

// Maximum number of iterations in each resolution level:
(MaximumNumberOfIterations 1000)

//SP: Param_a in each resolution level. a_k = a/(A+k+1)^alpha
(SP_a 10000.0)

//SP: Param_alpha in each resolution level. a_k = a/(A+k+1)^alpha
(SP_alpha 0.602)

//SP: Param_A in each resolution level. a_k = a/(A+k+1)^alpha
(SP_A 50.0)

// ********** Metric

//Number of grey level bins in each resolution level:
(NumberOfHistogramBins 32)
(FixedLimitRangeRatio 0.0)
(MovingLimitRangeRatio 0.0)
(FixedKernelBSplineOrder 3)
(MovingKernelBSplineOrder 3)

// ********** Several

(WriteTransformParametersEachIteration "false")
(WriteTransformParametersEachResolution "true")
(WriteResultImage "true")
(ShowExactMetricValue "false")
(ErodeFixedMask "false")
(ErodeMovingMask "false")
(UseDifferentiableOverlap "false")

// ********** ImageSampler
//Number of spatial samples used to compute the mutual information in each resolution level:
(ImageSampler "Random")
(NumberOfSpatialSamples 10000)
(NewSamplesEveryIteration "true")

// ********** Interpolator and Resampler

//Order of B-Spline interpolation used in each resolution level:
(BSplineInterpolationOrder 3)

//Order of B-Spline interpolation used for applying the final deformation:
(FinalBSplineInterpolationOrder 1)

//Default pixel value for pixels that come from outside the picture:
(DefaultPixelValue 0)

(ResultImagePixelType "float")
(ResultImageFormat "hdr")

Elastix mailing list
Elastix at bigr.nl<mailto:Elastix at bigr.nl>

Stefan Klein
+31 10 7043442
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bigr.nl/pipermail/elastix/attachments/20150403/a4a33b22/attachment-0001.html>

More information about the Elastix mailing list