SuperElastix / SimpleElastix

Multi-lingual medical image registration library
http://simpleelastix.github.io
Apache License 2.0
509 stars 149 forks source link

Masking for affine registration #410

Closed gazile17 closed 3 years ago

gazile17 commented 3 years ago

Hello,

I've tried to perform an affine registration with initially setting a fixed binary mask. The registration works, however it does not differ from the result without setting a fixed mask prior to the same registration. I did masking before and for a bspline registration it worked perfectly fine. For the affine registration, the whole image is transformed despite setting a mask before. Can anyone relate to this problem? Thank you in advance!

All the best

sorenchr2011 commented 3 years ago

An affine transform is global to the image. It maps every voxel in the fixed image to a point in the moving image space - regardless if you use a mask or not. The masking is used during registration, not during the final resampling. So using a mask/not using masking is not bound to give you a different result for a global transformation. It depends on to what extent the mask exterior would have led to a different result. For example, if the exterior is different between moving and fixed, then the result would likely be better with masking. If the mask-exterior is similar, eg zeros, then it is likely masking would have limited to no effect (for a global transform).

Soren

On Wed, Dec 16, 2020 at 10:07 AM gazile17 notifications@github.com wrote:

Hello,

I've tried to perform an affine registration with initially setting a fixed binary mask. The registration works, however it does not differ from the result without setting a fixed mask prior to the same registration. I did masking before and for a bspline registration it worked perfectly fine. For the affine registration, the whole image is transformed despite setting a mask before. Can anyone relate to this problem? Thank you in advance!

All the best

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SuperElastix/SimpleElastix/issues/410, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHBDDNFFLXHW254KTC6HCTSVB2FLANCNFSM4U5UQOJA .

gazile17 commented 3 years ago

Alright, thank you very much for the quick and clear explanation!