How to Improve rigid registration for 2D images

219 Views Asked by At

I am looking for a way to improve the rigid registration procedure of 2D images and evaluate metrics for better rigid registration using SimpleITK, here is my code

import SimpleITK as sitk
import matplotlib.pyplot as plt
import numpy as np
import os
moving_Image = sitk.ReadImage("mri_2d_moving.tif")
fixed_Image = sitk.ReadImage('mri_structural_2d.tif')
movingImageArray=sitk.GetArrayFromImage(moving_Image)
fixedImageArray=sitk.GetArrayFromImage(fixed_Image)
plt.imshow(movingImageArray,cmap='Greens', vmin=0, vmax=255)
plt.imshow(fixedImageArray, alpha=0.5,cmap='Oranges', vmin=0, vmax=255)

elastixImageFilter = sitk.ElastixImageFilter()
registration_method= sitk.ImageRegistrationMethod()
elastixImageFilter.SetFixedImage(fixed_Image)
elastixImageFilter.SetMovingImage(moving_Image)
elastixImageFilter.SetParameterMap(sitk.GetDefaultParameterMap("rigid"))
elastixImageFilter.Execute()
outputImage=elastixImageFilter.GetResultImage()
outputImageArray=sitk.GetArrayFromImage(outputImage)
plt.imshow(outputImageArray,cmap='Greens', vmin=0, vmax=255)
plt.imshow(fixedImageArray, alpha=0.5,cmap='Oranges', vmin=0, vmax=255)

The registration is terrible along the edges how can I change the parameters to improve registration, any suggestions are welcome

Imaging data can be downloaded from the below links

moving image fixed image

0

There are 0 best solutions below