Looks like saving the moving_resampled onto the drive and opening in slicer made it work .

Thank you .

I have another question regarding initializing the affine transformation center points . I want to initialize the center point of affine transformation at carina point in the fixed image . And the initial transform as difference between the carina points in moving and fixed image .

I have imparted the carina points as a list of vectors [ x, y , z] for both fixed and moving image .

And right now the code only uses this as initial transform

initial_transform = sitk.CenteredTransformInitializer(Fixed_image_sitk,

Moving_image_sitk,

sitk.AffineTransform(3),

sitk.CenteredTransformInitializerFilter.MOMENTS)

And

final_transform = sitk.AffineTransform(initial_transform) as final transform .

Is there a way I could use something like

Fixed_img_carina_points = [ x,y,z]

final_transform = sitk.AffineTransform(initial_transform.GetMatrix,initial_transform.GetTranslation,Fixed_img_carina_points) to compute the final transform .

I hope it makes sense .

Thank you once again

Its just I’m new to registration and SimpleItk toolkit is really helping me