[英]DICOM Header parsing using pixelMed
Am trying to read DICOM Header using pixelMed Library.我正在尝试使用 pixelMed 库读取 DICOM 标头。 Here's the code snippet.
这是代码片段。
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);
}
How to read the description of dicom tags.如何阅读 dicom 标签的描述。 Ex: For tag: 0008,0020, the description should be "Study Date".
例如:对于标签:0008,0020,描述应为“学习日期”。
使用 pixelMed 的“DicomDictionary”类,我能够通过传递 AttributeTag 来检索标签描述。
String tagDescription = dicomDictionary.getFullNameFromTag(new AttributeTag(int, int));
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.