comparison OrthancFramework/Sources/DicomParsing/DicomModification.cpp @ 4688:177ad026d219

backward compatibility with old DicomModification serialization from Orthanc <= 1.6.1
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 10 Jun 2021 10:09:54 +0200
parents fcd2dc7c8f31
children 13efc0967cea
comparison
equal deleted inserted replaced
4687:fcd2dc7c8f31 4688:177ad026d219
1451 removePrivateTags_ = SerializationToolbox::ReadBoolean(serialized, REMOVE_PRIVATE_TAGS); 1451 removePrivateTags_ = SerializationToolbox::ReadBoolean(serialized, REMOVE_PRIVATE_TAGS);
1452 level_ = StringToResourceType(SerializationToolbox::ReadString(serialized, LEVEL).c_str()); 1452 level_ = StringToResourceType(SerializationToolbox::ReadString(serialized, LEVEL).c_str());
1453 allowManualIdentifiers_ = SerializationToolbox::ReadBoolean(serialized, ALLOW_MANUAL_IDENTIFIERS); 1453 allowManualIdentifiers_ = SerializationToolbox::ReadBoolean(serialized, ALLOW_MANUAL_IDENTIFIERS);
1454 keepStudyInstanceUid_ = SerializationToolbox::ReadBoolean(serialized, KEEP_STUDY_INSTANCE_UID); 1454 keepStudyInstanceUid_ = SerializationToolbox::ReadBoolean(serialized, KEEP_STUDY_INSTANCE_UID);
1455 keepSeriesInstanceUid_ = SerializationToolbox::ReadBoolean(serialized, KEEP_SERIES_INSTANCE_UID); 1455 keepSeriesInstanceUid_ = SerializationToolbox::ReadBoolean(serialized, KEEP_SERIES_INSTANCE_UID);
1456 keepSopInstanceUid_ = SerializationToolbox::ReadBoolean(serialized, KEEP_SOP_INSTANCE_UID);
1457 updateReferencedRelationships_ = SerializationToolbox::ReadBoolean 1456 updateReferencedRelationships_ = SerializationToolbox::ReadBoolean
1458 (serialized, UPDATE_REFERENCED_RELATIONSHIPS); 1457 (serialized, UPDATE_REFERENCED_RELATIONSHIPS);
1459 isAnonymization_ = SerializationToolbox::ReadBoolean(serialized, IS_ANONYMIZATION); 1458 isAnonymization_ = SerializationToolbox::ReadBoolean(serialized, IS_ANONYMIZATION);
1459
1460 if (serialized.isMember(KEEP_SOP_INSTANCE_UID))
1461 {
1462 keepSopInstanceUid_ = SerializationToolbox::ReadBoolean(serialized, KEEP_SOP_INSTANCE_UID);
1463 }
1464 else
1465 {
1466 /**
1467 * Compatibility with jobs serialized using Orthanc between
1468 * 1.5.0 and 1.6.1. This compatibility was broken between 1.7.0
1469 * and 1.9.3: Indeed, an exception was thrown in "ReadBoolean()"
1470 * if "KEEP_SOP_INSTANCE_UID" was absent, because of changeset:
1471 * https://hg.orthanc-server.com/orthanc/rev/3860
1472 **/
1473 keepSopInstanceUid_ = false;
1474 }
1460 1475
1461 if (serialized.isMember(PRIVATE_CREATOR)) 1476 if (serialized.isMember(PRIVATE_CREATOR))
1462 { 1477 {
1463 privateCreator_ = SerializationToolbox::ReadString(serialized, PRIVATE_CREATOR); 1478 privateCreator_ = SerializationToolbox::ReadString(serialized, PRIVATE_CREATOR);
1464 } 1479 }