[Elastix] TransformRigidityPenalty

M.Staring at lumc.nl M.Staring at lumc.nl
Fri Apr 5 09:42:40 CEST 2013


Hi Lei,

Ah, so currently your setup does not work, even with multiple -fx's.

This is implemented in 
	src\Components\Registrations\MultiMetricMultiResolutionRegistration
Have a look at the file itkMultiMetricMultiResolutionImageRegistrationMethod.txx
the function CheckOnInitialize(). You can modify it to your needs.

If you find elastix is too stringent in some cases, please let us know, possibly with a patch, and we can see if that does not break any other use cases.

Regards, Marius


-----Original Message-----
From: Lei Wang [mailto:Lei.Wang.9985 at student.uu.se] 
Sent: vrijdag 5 april 2013 9:32
To: Staring, M. (LKEB)
Subject: RE: [Elastix] TransformRigidityPenalty

I guess I understand your point.
If I only want to register one pair of fixed and moving images with an extra "TransformRigidityPenalty" metric, it just works fine with the following parameter file.
elastix -f "fixedImage" -m "movingImage" -out "outputDirectory" -p "parameterFile"

parameterFile:

(Registration "MultiMetricMultiResolutionRegistration")
(ResampleInterpolator "FinalBSplineInterpolator")

//Metric
(Metric "AdvancedMattesMutualInformation" "TransformRigidityPenalty") (Metric0Weight 0.2) (Metric1Weight 0.8)

//ImagePyramid
(FixedImagePyramid "FixedRecursiveImagePyramid") (MovingImagePyramid "MovingRecursiveImagePyramid")

//ImageSampler
(ImageSampler "RandomCoordinate")

//Interpolator
(Interpolator "BSplineInterpolator")

But if I want to register two pairs of fixed and moving images with an extra "TransformRigidityPenalty" metric, Elastix always complains about the corresponding number of with the extra metric. Following is the command and the part of the parameter file

elastix -f0 "fixedImage1" -f1 "fixedImage2" -m0 "movingImage1" -m1 "movingImage2"-out "outputDirectory" -p "parameterFile"

parameterFile:
(Registration "MultiMetricMultiResolutionRegistration")
(ResampleInterpolator "FinalBSplineInterpolator")

//Metric
(Metric "AdvancedMattesMutualInformation"  
"AdvancedMattesMutualInformation" "TransformRigidityPenalty") (Metric0Weight 0.2) (Metric1Weight 0.4) (Metric2Weight 0.4)

//ImagePyramid
(FixedImagePyramid "FixedRecursiveImagePyramid" "FixedRecursiveImagePyramid") (MovingImagePyramid "MovingRecursiveImagePyramid"  
"MovingRecursiveImagePyramid")

//ImageSampler
(ImageSampler "RandomCoordinate" "RandomCoordinate")

//Interpolator
(Interpolator "BSplineInterpolator" "BSplineInterpolator")

Thanks a lot for your patience and your replay is highly appreciated.

Best Regards,

Lei


引述 M.Staring at lumc.nl:

> Hi Lei,
>
> Yes elastix could be more intuitive in this respect. When we made it 
> we wanted to keep it as general as possible.
> What you can do now is to feed elastix with your input images multiple 
> times, using -f0 -f1 etc.
>
> HTH, Marius
>
> -----Original Message-----
> From: elastix-bounces at bigr.nl [mailto:elastix-bounces at bigr.nl] On 
> Behalf Of Lei Wang
> Sent: donderdag 4 april 2013 21:32
> To: elastix at bigr.nl
> Subject: [Elastix] TransformRigidityPenalty
>
> Hi,
>
> My problem is that when multi Metric,like MutualInformation and 
> TransformRigidityPenalty are used for one pair of fixed and moving 
> image, only the metric itself need to be changed.
> However, when I have two pairs of fixed and moving image and try to 
> register them as multi band, the metric combination I want to try is 
> MutualInformation + MutualInformation + TransformRigidityPenalty.
> Then I need to match the number of Interpolator, Sampler, Pyramid with 
> the number of the metric. In this case, the number of the input images 
> is two pairs but the number of metric is three, so if I only use two 
> Interpolator, Sampler and Pyramid, Elastix will complain that the 
> number is not matching the metric, but if I use three, then I do not 
> have enough input images. How can I fix this problem?
>
> Thanks for your time.
>
> Best Regards,
>
> Lei
>
> _______________________________________________
> Elastix mailing list
> Elastix at bigr.nl
> http://lists.bigr.nl/cgi-bin/mailman/listinfo/elastix
>




More information about the Elastix mailing list