简体   繁体   English

SimpleITK getDirection() 解释

[英]SimpleITK getDirection() explained

Could someone explain the output of SimpleITK.GetDirection() and how is related to DICOM standard Image Orientation (Patient) header and NIFTI?有人可以解释SimpleITK.GetDirection()的 output 以及与 DICOM 标准图像方向(患者)header 和 NIFTI 的关系吗? Eventually, I would like to get the right Image Orientation (Patient) given a cut eg axial, sagittal, coronal.最终,我想获得正确的图像方向(患者)给定一个切口,例如轴向、矢状、冠状。

I am aware of the example, https://simpleitk.readthedocs.io/en/next/Examples/DicomSeriesFromArray/Documentation.html .我知道这个例子, https://simpleitk.readthedocs.io/en/next/Examples/DicomSeriesFromArray/Documentation.html However, why Image Orientation (Patient) is set the way is set, it's not clear to me.但是,为什么设置图像方向(患者)的方式是设置的,我不清楚。

In the Xdrt library that I use they deal with it like this to write a dicom:在我使用的Xdrt 库中,他们像这样处理它来编写一个 dicom:

direction = sitk_image.GetDirection()
_direction = (direction[0], direction[3], direction[6], direction[1], direction[4], direction[7])
...
image_slice.SetMetaData("0020|0037", "\\".join(map(str, _direction))),  # Image Orientation

You can watch their whole code here https://github.com/NKI-AI/xdrt/blob/ca3e83459dd76521bac597465c815cf6a3da35ad/xdrt/cli/utils.py#L157你可以在这里观看他们的全部代码https://github.com/NKI-AI/xdrt/blob/ca3e83459dd76521bac597465c815cf6a3da35ad/xdrt/cli/utils.py#L157

May it can help you愿它能帮到你

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM