comparison OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp @ 5158:02cfd23a556a

CppCheck
author Alain Mazy <am@osimis.io>
date Thu, 02 Feb 2023 10:33:15 +0100
parents 2df546a76e17
children 48005e522bd6
comparison
equal deleted inserted replaced
5157:874e6b135614 5158:02cfd23a556a
663 { 663 {
664 throw OrthancException(ErrorCode_BadSequenceOfCalls); 664 throw OrthancException(ErrorCode_BadSequenceOfCalls);
665 } 665 }
666 666
667 bool replacePatientMainDicomTags = false; 667 bool replacePatientMainDicomTags = false;
668 bool replaceStudyMainDicomTags = false;
669 bool replaceSeriesMainDicomTags = false;
670 bool replaceInstanceMainDicomTags = false;
671 668
672 ResourceType modificationLevel = modification_->GetLevel(); 669 ResourceType modificationLevel = modification_->GetLevel();
673 std::set<DicomTag> replacedTags; 670 std::set<DicomTag> replacedTags;
674 modification_->GetReplacedTags(replacedTags); 671 modification_->GetReplacedTags(replacedTags);
675 672
676 for (std::set<DicomTag>::const_iterator it = replacedTags.begin(); it != replacedTags.end(); it++) 673 for (std::set<DicomTag>::const_iterator it = replacedTags.begin(); it != replacedTags.end(); ++it)
677 { 674 {
678 replacePatientMainDicomTags |= DicomMap::IsMainDicomTag(*it, ResourceType_Patient); 675 replacePatientMainDicomTags |= DicomMap::IsMainDicomTag(*it, ResourceType_Patient);
679 replaceStudyMainDicomTags |= DicomMap::IsMainDicomTag(*it, ResourceType_Study);
680 replaceSeriesMainDicomTags |= DicomMap::IsMainDicomTag(*it, ResourceType_Series);
681 replaceInstanceMainDicomTags |= DicomMap::IsMainDicomTag(*it, ResourceType_Instance);
682 } 676 }
683 677
684 if ((modificationLevel == ResourceType_Study || modificationLevel == ResourceType_Patient) 678 if ((modificationLevel == ResourceType_Study || modificationLevel == ResourceType_Patient)
685 && !modification_->IsReplaced(DICOM_TAG_PATIENT_ID) 679 && !modification_->IsReplaced(DICOM_TAG_PATIENT_ID)
686 && modification_->IsKept(DICOM_TAG_STUDY_INSTANCE_UID) && modification_->IsKept(DICOM_TAG_SERIES_INSTANCE_UID) && modification_->IsKept(DICOM_TAG_SOP_INSTANCE_UID)) 680 && modification_->IsKept(DICOM_TAG_STUDY_INSTANCE_UID) && modification_->IsKept(DICOM_TAG_SERIES_INSTANCE_UID) && modification_->IsKept(DICOM_TAG_SOP_INSTANCE_UID))