问题
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