1

我正在尝试使用 pixelMed 库读取 DICOM Header。这是代码片段。

try {
    DicomInputStream dis = new DicomInputStream
                             (new ByteArrayInputStream(dicomHeaderBytes));
    AttributeList attributeList = new AttributeList();
    attributeList.setDecompressPixelData(false);
    attributeList.read(dis);
    attributeList.removeUnsafePrivateAttributes();
    /* Iterating over attribute List */
    for(Map.Entry<AttributeTag,Attribute> entry : attributeList.entrySet()){
            AttributeTag key = entry.getKey();
            Attribute value = entry.getValue();
            String vr = value.getVRAsString();
            String description = "";
    }
} catch (Exception e) {
    Log.error("Exception occurred", e);
}

如何阅读 dicom 标签的描述。例如:对于标签:0008,0020,描述应为“学习日期”。

4

1 回答 1

1

使用 pixelMed 的“DicomDictionary”类,我能够通过传递 AttributeTag 来检索标签描述。

String tagDescription = dicomDictionary.getFullNameFromTag(new AttributeTag(int, int));
于 2018-02-26T15:12:40.397 回答