There’s go my doubt:
I have a spinal cord mask in axial 3d sequence and I want to locate this mask in STIR sequence (same day/moment acquisition):
I have done some tries (first I’ve tried with the axial image where I marked the mask):
New image registered over STIR:
Registered mask. As you can see, the spinal cord not correctly match with the medular canal:
The codes that i’ve used:
mask_itk=sitk.Resample(mask,stir_itk, sitk.Transform(), sitk.sitkNearestNeighbor, 0,mask.GetPixelID())
Could you help me, please?
Thank you very much in advance!
The inaccurate overlap is likely due to an inaccurate registration. The latter can be due to multiple reasons:
- Premature convergence. You are printing the optimizer’s stopping condition, what is it?
- The transformation type is not appropriate for modeling the actual transformation. Is an affine transformation sufficient? If not, try
- This is a slice from a 3D volume, what is the actual overlap between the mask and spinal cord segmented in the STIR image (Dice coefficient between a reference/ground truth 3D segmentation and the computed one).
Minor comments about the post: Please share code using triple backtick and not screenshots. The images are displayed upside down as compared to standard anatomical display, took me a second to recognize what I was looking at. Clinicians are very unforgiving about this. They have strong feelings about what is and what is not a correct visualization of the anatomy.