comparison Core/DicomParsing/DicomModification.cpp @ 2521:6db878376018

support anonymization of CurrentRequestedProcedureEvidenceSequence
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 09 Apr 2018 17:59:16 +0200
parents b94ed97508e6
children d3476d90dcb7
comparison
equal deleted inserted replaced
2520:b94ed97508e6 2521:6db878376018
123 const std::vector<size_t>& parentIndexes, 123 const std::vector<size_t>& parentIndexes,
124 const DicomTag& tag, 124 const DicomTag& tag,
125 ValueRepresentation vr, 125 ValueRepresentation vr,
126 const std::string& value) 126 const std::string& value)
127 { 127 {
128 if ((tag == DICOM_TAG_FRAME_OF_REFERENCE_UID || 128 if (!IsEnabled(tag))
129 tag == DICOM_TAG_REFERENCED_FRAME_OF_REFERENCE_UID || 129 {
130 tag == DICOM_TAG_REFERENCED_SOP_INSTANCE_UID || 130 return Action_None;
131 tag == DICOM_TAG_RELATED_FRAME_OF_REFERENCE_UID) && 131 }
132 IsEnabled(tag)) 132 else if (tag == DICOM_TAG_FRAME_OF_REFERENCE_UID ||
133 tag == DICOM_TAG_REFERENCED_FRAME_OF_REFERENCE_UID ||
134 tag == DICOM_TAG_REFERENCED_SOP_INSTANCE_UID ||
135 tag == DICOM_TAG_RELATED_FRAME_OF_REFERENCE_UID)
133 { 136 {
134 newValue = that_.MapDicomIdentifier(Toolbox::StripSpaces(value), ResourceType_Instance); 137 newValue = that_.MapDicomIdentifier(Toolbox::StripSpaces(value), ResourceType_Instance);
138 return Action_Replace;
139 }
140 else if (parentTags.size() == 1 &&
141 parentTags[0] == DICOM_TAG_CURRENT_REQUESTED_PROCEDURE_EVIDENCE_SEQUENCE &&
142 tag == DICOM_TAG_STUDY_INSTANCE_UID)
143 {
144 newValue = that_.MapDicomIdentifier(Toolbox::StripSpaces(value), ResourceType_Study);
145 return Action_Replace;
146 }
147 else if (parentTags.size() == 2 &&
148 parentTags[0] == DICOM_TAG_CURRENT_REQUESTED_PROCEDURE_EVIDENCE_SEQUENCE &&
149 parentTags[1] == DICOM_TAG_REFERENCED_SERIES_SEQUENCE &&
150 tag == DICOM_TAG_SERIES_INSTANCE_UID)
151 {
152 newValue = that_.MapDicomIdentifier(Toolbox::StripSpaces(value), ResourceType_Series);
135 return Action_Replace; 153 return Action_Replace;
136 } 154 }
137 else 155 else
138 { 156 {
139 return Action_None; 157 return Action_None;