Using SimpleITK for stitching medical volumes with overlap

Hello All,

I am trying to stitch 2 MRI scans which have a region of overlap by first registering them together using Elastix Image Filter. Then in order to add (stitch) them together I have to align them both on the same plane with the same origin. My question is, how to use the results from the Elastix Image Filter to do the aligning?


Do you have specific reference to the “Elastix Image Filter” that you are using? I don’t believe that is in SimpleITK it self. It may be part of SimpleElastix, in which case I’d as the question to them.

ITK proper doesn’t have a “stitching” filter although there may be some remote or external module which does. If it’s available it could be wrapped for SimpleITK by writing a JSON file for the filter.

Alternatively, the operation could be done with existing filters. First you would need to compute the origin, orientation, direction, size of the desired output image. This might be the origin, spacing and direction of the fixed image, but the size expanded to contain the transformed corners for the moving image. Then both images would be resampled onto this new image domain, lastly the two resampled images would need to be blended.