我正在尝试使用 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,描述应为“学习日期”。