Hello I have multiple studies of the same patient they have different spacing and size (range). When I display them in a slicer they are coregistered - patient did not moved between studies
Hovewer I do not know how to get different modalities to the same grid.
I tried to use 1 epoch registration by elastix but it leads sometimes to erroneous translation comparing to slicer display.
Thanks for any suggestions!
Based on the description, the images are already aligned. What you need to do is resample one of them onto the other’s grid using the identity transformation (ITK example, SimpleITK notebook).
Thanks @zivy ! still just to be sure one image is bigger than the other meaning that for example one starts from top of the head and the other from the neck hence one needs padding to accommodate for it - it is not a problem here?
Please take a look at the Resampling after registration section in the notebook referenced above. It discusses the exact issue you are raising. You can run it using the “launch binder” button, top right.
Since @Jakub_Mitura wrote that “I do not know how to get different modalities to the same grid”, I think he needs not just resampling, but also registration, because the image origin is usually differs between two acquisitions on different imaging (unless it is an integrated system, like a PET/CT).
For a successful intensity-based automatic image registration, you typically need to crop the input images to the overlapping region. For example, if one image contains the neck and up and the other image contains the neck and down, then you need to crop both images to the neck and register those. You can then use the computed transform to align the original non-cropped image.
Thanks!! to be more precise I have a t2w image with some prostate segmentation and the adc image
When I open slicer and get the annotations made on t2w and display them on adc it displays in correct spot. Hence Slicer without registration based just on metadata is able to locate it well. I tried to use elastix for registration but it is generally inferior to what the slicer do without any registration