Corresponding points matching weight has no effect

144 views
Skip to first unread message

Krishna Nanda

unread,
Dec 18, 2021, 1:08:57 AM12/18/21
to elastix-imageregistration
Dear all,

I am using SimpleElastix for registering two 3D CT scans.

The weights of the various terms in the registration optimization include:
bsplineMap["Metric0Weight"] = ("1.0",) # Image similarity
bsplineMap["Metric1Weight"] = ("1.0",) # Transform bend regularization
bsplineMap["Metric2Weight"] = ("1.0",) # TransformRigidityPenalty; Local rigidity constraint
bsplineMap["Metric3Weight"] = ("1.0",) # CorrespondingPointsEuclideanDistanceMetric; Matching Landmarks weight.
For CorrespondingPointsEuclideanDistanceMetric, I pass in 5 corresponding anatomical points in the two scans via pts files. Adding the CorrespondingPointsEuclideanDistanceMetric
term has some effect on the final registration output compared to when the term is absent. But the issue is, it seems to not matter how much I weight the term. i.e., the registration
output seems to be the same irrespective of weight assigned to this term. I tried varying the weight from 1 to 50 with no difference in output. Maybe I am missing something. I am looking
to increase the effect of matching landmarks. Any advice on this will be greatly helpful.

Thank you!




m.st...@lumc.nl

unread,
Dec 24, 2021, 5:19:20 AM12/24/21
to elastix-imag...@googlegroups.com

Dear Krishna


Did you try the same with the elastix command line executable? It may be the case that the SimpleElastix version does not support this specific setup.


Best, Marius



From: elastix-imag...@googlegroups.com <elastix-imag...@googlegroups.com> on behalf of Krishna Nanda <krishn...@gmail.com>
Sent: 18 December 2021 7:08 AM
To: elastix-imageregistration
Subject: [elastix-imageregistration] Corresponding points matching weight has no effect
 
--
You received this message because you are subscribed to the Google Groups "elastix-imageregistration" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elastix-imageregis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elastix-imageregistration/5f97aabc-c243-4cea-85fa-d026ebee82fbn%40googlegroups.com.

Krishna Nanda

unread,
Dec 26, 2021, 4:53:19 PM12/26/21
to elastix-imag...@googlegroups.com
Thanks for your reply Marius!

I observe the same behavior with elastix command line. I.e., the different weights for the landmark matching term doesn't seem to have any effect.

1) Do the metric weights need to be in a specific range, say [0,1]? I tried restricting the weights to [0,1] to no avail, i.e., all the following weights produce the same output.
Metric0Weight = 0.5; Metric1Weight = 0.5; Metric2Weight = 0.5; Metric3Weight = 0.5
Metric0Weight = 0.5; Metric1Weight = 0.5; Metric2Weight = 0.5; Metric3Weight = 0.75
Metric0Weight = 0.5; Metric1Weight = 0.5; Metric2Weight = 0.5; Metric3Weight = 1.0

I am attaching the parameter file below. Does this seem ok to you?

2) In my case, I previously registered the images using deformable registration, but with no matching landmark points. I am looking to improve that result by further specifying matching points between the fixed image and the previously registered moving image, and performing a second round of deformable registration. Would it instead be better to specify the matching points in the original unregistered images in the first place and perform deformable registration in one step?    

Thanks for your advice!

Example parameter file:
----------------------------------
(AutomaticParameterEstimation "true")
(CheckNumberOfSamples "true")
(DefaultPixelValue 0.000000)
(ErodeMask "false")
(FinalBSplineInterpolationOrder 3.000000)
(FinalGridSpacingInPhysicalUnits 8.000000)
(FixedImagePyramid "FixedSmoothingImagePyramid")
(GridSpacingSchedule 2.803221 1.988100 1.410000 1.000000)
(ImageSampler "RandomSparseMask")
(Interpolator "LinearInterpolator")
(MaximumNumberOfIterations 256.000000)
(MaximumNumberOfSamplingAttempts 8.000000)
(Metric "AdvancedMattesMutualInformation" "TransformBendingEnergyPenalty" "TransformRigidityPenalty" "CorrespondingPointsEuclideanDistanceMetric")
(Metric0Weight 0.500000)
(Metric1Weight 0.500000)
(Metric2Weight 0.500000)
(Metric3Weight 1.000000)
(MovingImagePyramid "MovingSmoothingImagePyramid")
(MovingRigidityImageName "rigidity_mask.nrrd")
(NewSamplesEveryIteration "true")
(NumberOfResolutions 4.000000)
(NumberOfSamplesForExactGradient 4096.000000)
(NumberOfSpatialSamples 2048.000000)
(Optimizer "AdaptiveStochasticGradientDescent")
(Registration "MultiMetricMultiResolutionRegistration")
(ResampleInterpolator "FinalBSplineInterpolator")
(Resampler "DefaultResampler")
(ResultImageFormat "nii")
(Transform "BSplineTransform")
(WriteIterationInfo "false")
(WriteResultImage "true")

m.st...@lumc.nl

unread,
Jan 3, 2022, 4:23:55 AM1/3/22
to elastix-imag...@googlegroups.com

Hi Krishna,


1) I am not sure what is happening, the only thing that I can think of is that elastix has trouble with dealing with this particular combination of metrics: one based on the images, two based on the transforms, and one on a point set. Did you check with leaving out a few metrics? Other than that, a debugger may help to inspect if the weights are used or not.


2) I would indeed use the points from the start.


Best, Marius




Sent: 26 December 2021 10:53 PM
To: elastix-imag...@googlegroups.com
Subject: Re: [elastix-imageregistration] Corresponding points matching weight has no effect
 
Reply all
Reply to author
Forward
0 new messages