Request for Advice on Image Registration Issue

65 views
Skip to first unread message

Mohammad Javad Shojaei

unread,
Mar 17, 2023, 9:42:54 AM3/17/23
to elastix-imageregistration
Hello everyone,

I would like to register the two mask images attached to this message. However, I have noticed that the registration process is not entirely accurate, as the resulting image is elongated along the length of the mask, as you can see in the attached results. I would appreciate any advice on how to fix this issue. I have also attached the registration parameters for your review.

Best regards,
Javad
result.0.tif
Moving.tif
Fixed.tif
nonlinear.txt

Mohammad Javad Shojaei

unread,
Mar 17, 2023, 9:46:22 AM3/17/23
to elastix-imageregistration
You can see the results of the registration here
result.0.jpg

N. Heath Patterson

unread,
Mar 17, 2023, 10:11:07 AM3/17/23
to elastix-imageregistration
Hi Javad,

Using a B-spline interpolator can be problematic when resampling binary masks after registration because B-spline interpolation is a continuous function and may generate values between 0 and 1 for pixels that should be strictly binary (i.e., either 0 or 1). This can lead to the introduction of intermediate values between 0 and 1, which can cause errors when the binary mask is used for subsequent analyses or processing steps.

For example, if a binary mask is being used to delineate a region of interest (ROI), intermediate values introduced by the B-spline interpolation can cause the ROI to be inaccurately defined or even split into multiple regions. Additionally, if the binary mask is being used for segmentation or thresholding, the introduction of intermediate values can cause errors or inaccuracies in the resulting segmentation or thresholding.

To avoid these issues, other interpolation methods, such as nearest-neighbor interpolation should be used when resampling binary masks. These methods ensure that the resampled values are either 0 or 1, which preserves the binary nature of the mask and reduces the likelihood of errors in subsequent processing steps.

To use this with your current schema, set (FinalBSplineInterpolationOrder 3) --> (FinalBSplineInterpolationOrder 0)

Best of luck,
Heath

Mohammad Javad Shojaei

unread,
Mar 17, 2023, 11:19:01 AM3/17/23
to elastix-imageregistration
Dear Heath,

Many thanks for your advice. I followed it, but unfortunately, I still have the same issue. Additionally, I changed the pixel value of 0 to 25 and 1 to 250, but as you can see in the attached image, it didn't help, as you can see at the bottom of the shape. Do you have any suggestions on other parameters or methods that I should try?

Best regards,
Javad

result.0.jpg
Reply all
Reply to author
Forward
0 new messages