dcm4che3 java lib: Attributes.addAll method seems to lost multiple LO values

一曲冷凌霜 提交于 2020-08-10 22:31:05

问题


This question is coming from the bug found in this post: How to read DICOM string value with backslash (VR=LO, Value="0.4323\0.2325")?

With dcm4che3 in java, I read my attributes of dcm file like that:

public Attributes readDicomAttributes(MultipartFile file) throws IOException 
  {
    DicomInputStream dis = new DicomInputStream(file.getInputStream());
    Attributes dataSet = dis.readDataset(-1, Tag.PixelData);
    Attributes fmi = dis.readFileMetaInformation();
    dis.close();

    fmi.addAll(dataSet);

    return fmi;
  }

I have a private tag in my dicom which is LO (long string) and multiple values: 0.626492\0.342747

if I inspect my var dataSet, I can read in it (0011,0013) LO [0.626492\0.342747] PrivateCreatorID

If I inspect fmi at the end, I have (0011,0013) LO [0.626492] PrivateCreatorID

It seems the addAll function is messing. Have you another solution other than:

dataSet.addAll(fmi);
return dataSet;

来源:https://stackoverflow.com/questions/63269682/dcm4che3-java-lib-attributes-addall-method-seems-to-lost-multiple-lo-values

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!