baiwenjia / ukbb_cardiac

Some code for processing and analysing UK Biobank cardiac MR images.
Apache License 2.0
149 stars 65 forks source link

conversion from long axis to short axis #6

Closed sanajabbarweb closed 3 years ago

sanajabbarweb commented 4 years ago

hi, i was reading your work done in "automated analysis of CMR images", its great indeed. i am also working on multi organ segmentation, i have an issue in conversion of long axis images in short axis. how did you perform this conversion for above mentioned work. how did you perform conversion for labels, did you use interpolation? response would be highly appreciated.

baiwenjia commented 3 years ago

If you mean convert the long-axis view into the short-axis view space (or vice versa), it is mainly about coordinate conversion. Suppose we have image A and image B which have different origin and axis orientations, we can first convert the image coordinate for each pixel in image A to the world coordinate, then convert the world coordinate to the image coordinate in image B. The affine matrix for the conversion is available from the nifti header.