ITK图像下标与物理位置的转换及内部计算
描述
ITK本身提供了图像物理位置和图像下标的转换接口,即在提供了准确的必要图像信息(包括origin, spacing, direction of the image samples )之后,可以使用
TransformPhysicalPointToIndex()TransformPhysicalPointToIndex()TransformPhysicalPointToIndex() ,将物理位置转换为图像下标,函数返回bool值,表明该物理点是否在图像内部。
TransformIndexToPhysicalPointTransformIndexToPhysicalPointTransformIndexToPhysicalPoint , 将图像下标转为物理位置点。
其内部转换关系如下
图像下标index 转物理 坐标

其中

本文详细介绍了ITK库中如何进行图像的物理位置与下标之间的转换,包括TransformPhysicalPointToIndex()和TransformIndexToPhysicalPoint()函数的使用。内容涉及图像的origin、spacing、direction等关键参数,并提供了Matlab和C/C++的代码示例。同时,解释了imageorientation和imagedirection的区别,前者描述患者姿态,后者关乎像素到物理坐标的映射关系。
最低0.47元/天 解锁文章
378

被折叠的 条评论
为什么被折叠?



