[ITK] [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/community/attachments/20170305/fbd5c492/attachment.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list