SimpleElastix
SimpleElastix copied to clipboard
How can I get a intuitive Mean result image?
Hello, I am a freshman to SimpleElastix,how can I get a intuitive Mean result image like this ?⬇
The code I used is as follows:
import SimpleITK as sitk
elastixImageFilter = sitk.ElastixImageFilter()
elastixImageFilter.SetFixedImage(sitk.ReadImage("fixedImage.nii")
elastixImageFilter.SetMovingImage(sitk.ReadImage("movingImage.nii")
elastixImageFilter.SetParameterMap(sitk.GetDefaultParameterMap("affine"))
elastixImageFilter.Execute()
res_img = elastixImageFilter.GetResultImage()
And I plot 'res_img' with matplotlib ,the result is just a single image after registration
I notice that we can use
cimg = sitk.Compose(simg1, simg2, simg1 // 2. + simg2 // 2.)
to achieve a simliar effect in SimpleITK,
However ,I do not have the the image which is the movingImage after registration in SimpleElastix ,and I only get the res_img. Is 'res_img' equal to moving image after transforming?
Hi @ddddg929 yes, the result image is the transformed moving image. And the intuitive mean image is indeed created using sitk.Compose().
Thank you very much for your kind response!