如何使用dcm4che在DICOM中创建新/自定义标签? [英] How can I create new/custom tags in DICOM using dcm4che?

查看:299
本文介绍了如何使用dcm4che在DICOM中创建新/自定义标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想向DICOM数据集添加一些私人数据/信息。该数据不适合任何标准DICOM标签。

I want to add some private data/information to DICOM data set. This data does not fit in any standard DICOM tags.

因此,我想使用dcm4che在DICOM数据集中添加一些特定的新/自定义标签,这些标签不在DICOM库中。

So, I want to add some specific new/custom tags in DICOM data set using dcm4che those are not in the DICOM library.

如何使用dcm4che在DICOM中创建新的/自定义标签?

How can I create new/custom tags in DICOM using dcm4che?

推荐答案

用于私有数据元素标签;这些由DICOM支持。组号为奇数的任何标签都是私有标签。因此,标签(0x00210011)[DicomTag(33,17)] 成为私有标签。

You are looking for Private Data Element Tags; those are supported by DICOM. Any tag with odd group number is Private Tag. So the tag (0x00210011) [DicomTag(33, 17)] becomes private tag.


私有数据元素的结构与之前在7.1节中指定的标准数据元素相同(即,数据元素标签字段,可选VR字段,长度字段和值字段)。 专用数据元素的元素标签中使用的组号应为奇数。专用数据元素应以数据元素标签的递增数字顺序包含在数据集中。私有数据元素的值字段应具有此标准在6.2节中指定的VR之一。

Private Data Elements have the same structure as Standard Data Elements specified earlier in Section 7.1 (i.e., Data Element Tag field, optional VR field, length field, and value field). The Group Number used in the Element Tag of Private Data Elements shall be an odd number. Private Data Elements shall be contained in the Data Set in increasing numeric order of Data Element Tag. The Value Field of a Private data element shall have one of the VRs specified by this standard in Section 6.2.

另一本指南以框图说明:


多个实现者可能会定义具有相同(奇数)组编号的私有元素。为避免冲突,应根据以下规则为私有元素分配私有数据元素标签。

It is possible that multiple implementers may define Private Elements with the same (odd) group number. To avoid conflicts, Private Elements shall be assigned Private Data Element Tags according to the following rules.


  • 私有创建者数据元素编号为(gggg,0010 -00FF)(gggg为奇数)将用于保留一组具有gggg组号的元素,以供单个实施者使用。实现者应在该系列的第一个未使用(未分配)的元素中插入一个识别码,以保留一组私有元素。 私有标识代码的VR应为LO(长字符串),并且VM应等于1

  • 私有创建者数据元素(gggg,0010) ,是一种类型1数据元素,用于标识实现者保留元素(gggg,1000-10FF),私有创建者数据元素(gggg,0011)标识实现者保留元素(gggg,1100-11FF),依此类推,直到私有创建者数据元素(gggg,00FF)标识实现者保留元素(gggg,FF00 -FFFF)。因此,可以保留并在一组中使用的块总数为0XFF-0X10 = 240。

< a href = http://dicom.nema.org/dicom/2013/output/chtml/part05/sect_7.8.html rel = nofollow noreferrer>来源:规格

请参阅其他文章

使用dcm4che,您可以像添加任何其他标签一样添加它;只需明确指定标签,而不使用 Tag.StudyTime

With dcm4che, you add it the same way you add any other tag; just specify the tag explicitly instead of using something like Tag.StudyTime.

Attributes attribs = new Attributes();
attribs.setString(0x00210011, VR.LO, "your data");

这篇关于如何使用dcm4che在DICOM中创建新/自定义标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆