背景
Dicom影像处理软件要求根据不同部署医院显示不同的Tag信息,Tag显示位置也有变化。
思路
提供配置文件,由运维售后工程师配置处理,可配置显示哪些tag信息及其显示位置。
代码
xml配置
<?xml version="1.0" encoding="utf-8" ?>
<Document>
<Modality name="DEFAULT">
<DrawType name="CornerInfo">
<item tag="00100010" format="%s\n" pos="0">Patient's Name</item>
<item tag="00100020" format="%s\n" pos="1">Patient ID</item>
<item tag="00100030" format="%s\n" pos="2">Patient's Birth Date</item>
<item tag="00100040" format="%s\n" pos="3"> Patient's Sex</item>
<item tag="00101010" format="%s\n" pos="4">Patient's Age</item>
<item tag="00080022" format="%s\n" pos="5">Aquisition Date</item>
<item tag="00080032" format="%s\n" pos="6">Aquisition Time</item>
<item tag="00080033" format="%s\n" pos="7">Others</item>
</DrawType>
</Modality>
</Document>
配置dicom信息可显示在图像的8个方位,分别是0,1,2…7,0为左上角,6为左下角,2为右上角,4为右下角,可一行显示多个,或者换行显示。
完整demo