On Apr 24, 8:18 am, "niloufar " <
ndarv...@kth.se> wrote:
> i am working on Spect images axial slices, i've got an slice and i have the boundaries of the slice how can i find the medial axis of this slice and rotate the whole stack of slices around this axis?
> thanks
---------------------------------------------------------------------------------------------
I'd probably find the centroid of each slice using regionprops(), then
use polyfit() to get an equation of a line giving the centroid as a
function of z (slice #). Get your Euler angles from that. Next step
is to rotate. Unfortunately, there is no imrotate for 3D volumetric
images so you're stuck doing that on your own with regular
transformation matrix which you can find online in a number of places
(just look up "3D rotation matrix" or something like that).