简体   繁体   English

使用pixelmed在DICOM属性上读写

[英]Read and Write on DICOM attribute with pixelmed

I'm trying to read data attribute from its tag in Java with the library pixelmed . 我正在尝试使用pixelmed库从Java中的其标签读取data属性。 the code that I had is : 我的代码是:

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());    

}

With this code i get data of all attributes : 通过此代码,我可以获得所有属性的数据:

���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                    

But I just want to get the information on the tag (0x0010,0x0010) . 但我只想获取有关标签(0x0010,0x0010)

Have you considered: 你有没有考虑过:

AttributeList list = new AttributeList();
list.read(file);
String patientName=Attribute.getDelimitedStringValuesOrEmptyString(list,TagFromName.PatientName);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM