[ITK-users] 3D image centre

D'Isidoro Fabio fisidoro at ethz.ch
Sun Mar 5 17:14:02 EST 2017


Hi,

since the image origin is defined in the middle of the "first" voxel and not at the very corner of the CT scan, I would calculate the image centre as:

               img_centre[0] = origin[0] + spacing[0] * static_cast<double>(size[0]) / 2.0 - spacing[0] / 2.;

Is that right?

Thank you

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20170305/fbd5c492/attachment.html>


More information about the Insight-users mailing list