简体   繁体   English

使用SimpleITK访问DICOM图像的所有MetaData键

[英]Access all MetaData keys of a DICOM image with SimpleITK

I'm using SimpleITK to work on DICOM PET images in Python. 我正在使用SimpleITK在Python中处理DICOM PET图像。

I need to access some information stored in the DICOM header to convert the pixel value from Bq/mL to SUV. 我需要访问DICOM标头中存储的一些信息,以将像素值从Bq / mL转换为SUV。 I am fine with accessing the MetaData Dictionnary with img.GetMetaData(key) . 我可以通过img.GetMetaData(key)访问MetaData Dictionnary。 However, some keys I want to access are not available in the MetaData Dictonnary delivered by SimpleITK. 但是,我想访问的某些键在SimpleITK提供的MetaData Dictonnary中不可用。

An error is raised when I try to access the tags '0018,1074' and '0018,1072' for example whereas it seems that these tags exist because I can find them in ImageJ. 例如,当我尝试访问标签'0018,1074'和'0018,1072'时会引发错误,而这些标签似乎存在是因为我可以在ImageJ中找到它们。 I also tried to access them with the private tags taken into account. 我还尝试使用考虑到的私有标签来访问它们。 Do you know why these tags are not available in the list of tags given by GetMetaDataKeys() ? 您知道为什么GetMetaDataKeys()给出的标签列表中没有这些标签吗? How can I access them? 如何访问它们?

Thanks for your help 谢谢你的帮助

DICOM datasets have a hierarchical (tree) structure. DICOM数据集具有分层(树)结构。 The attributes in your question are sub items of the Radiopharmaceutical Information Sequence (0054,0016). 您问题中的属性是放射性药物信息序列(0054,0016)的子项。 I suspect that you are trying to access them as top level elements like patient name (0010,0010). 我怀疑您正在尝试像患者姓名(0010,0010)这样的顶级元素来访问它们。

I do not know how to do this in python, but I would expect that you can obtain an array of arrays from the attribute Radiopharmaceutical Information Sequence (0054,0016). 我不知道如何在python中执行此操作,但我希望您可以从属性Radiopharmaceutical Information Sequence(0054,0016)获得数组数组。 Each array would represent one item in the sequence and each of these items may give you access to the attributes you want to read. 每个数组将代表序列中的一个项目,这些项目中的每个项目都可以使您访问要读取的属性。

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

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