DcmObjectImpl.putAll method can incorrectly set private tags with different creator, same group
Description
Consider the following code snippet:
Dataset ds = DcmObjectFactory.getInstance().newDataset();
ds.setPrivateCreatorID("PRIVATE_CREATOR_1");
ds.putXX(0x00310016, "PC1_TEXT");
ds.putXX(0x00310017, "PC1_TEXT2");
ds.setPrivateCreatorID("PRIVATE_CREATOR_2");
ds.putXX(0x00310016, "PC2_TEXT");
ds.putXX(0x00310018, "PC2_TEXT2");
Dataset ds1 = DcmObjectFactory.getInstance().newDataset();
ds1.putAll(ds);
The resulting attributes in ds1 are not the same as the original ds.
ds contains:
[(0031,0010),LO,*1,#18,[PRIVATE CREATOR 1], (0031,0011),LO,*1,#18,[PRIVATE CREATOR 2], (0031,1016),LO,*1,#8,[PC1_TEXT], (0031,1017),LO,*1,#10,[PC1_TEXT2], (0031,1116),LO,*1,#8,[PC2_TEXT], (0031,1118),LO,*1,#10,[PC2_TEXT2]]
ds1 contains:
[(0031,0010),LO,*1,#18,[PRIVATE CREATOR 2], (0031,1016),LO,*1,#8,[PC2_TEXT], (0031,1017),LO,*1,#10,[PC1_TEXT2], (0031,1018),LO,*1,#10,[PC2_TEXT2]]
This appears to be limited to private tags with the same group(0031) but having different private creator.
Environment
Activity
Attach patched dcm4che-1.4.30