0

我正在尝试使用 library 从 Java 中的标记中读取数据属性pixelmed。我的代码是:

public static void main(String args[]) throws IOException, DicomException {

DicomInputStream my_image = new DicomInputStream(new File("/Volumes/CDP/20130212101717421/20130212101636203"));

AttributeList list = new AttributeList();

SpecificCharacterSet sc=new SpecificCharacterSet(list);
PersonNameAttribute pna=new PersonNameAttribute(TagFromName.PatientName,1000,my_image,sc);


System.out.println(pna.getDelimitedStringValuesOrEmptyString());    

}

使用此代码,我可以获得所有属性的数据:

���UL������OB��������UI�1.2.840.10008.5.1.4.1.1.4���UI6�1.2.840.113619.2.244.6945.224850.21460.1360606914.740���UI�1.2.840.10008.1.2.1���UI�1.2.376.99999.1.1.20041017��SH�CDP_V3��AE�MRS��CS
�ISO_IR ... etc etc                    

但我只想获取标签上的信息(0x0010,0x0010)

4

1 回答 1

1

你有没有考虑过:

AttributeList list = new AttributeList();
list.read(file);
String patientName=Attribute.getDelimitedStringValuesOrEmptyString(list,TagFromName.PatientName);
于 2014-04-09T20:11:44.680 回答