Mercurial > hg > orthanc
comparison Core/DicomNetworking/Internals/FindScp.cpp @ 3108:55dacaf139ed
Don't consider tags whose group is below 0x0008 in C-FIND SCP
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 10 Jan 2019 21:23:31 +0100 |
parents | 4e43e67f8ecf |
children | 1bcc35e4615a |
comparison
equal
deleted
inserted
replaced
3107:554832246eaa | 3108:55dacaf139ed |
---|---|
164 HandleExistentButEmptyReferencedStudyOrPatientSequenceAttributes(dataset, DCM_ReferencedStudySequence); | 164 HandleExistentButEmptyReferencedStudyOrPatientSequenceAttributes(dataset, DCM_ReferencedStudySequence); |
165 HandleExistentButEmptyReferencedStudyOrPatientSequenceAttributes(dataset, DCM_ReferencedPatientSequence); | 165 HandleExistentButEmptyReferencedStudyOrPatientSequenceAttributes(dataset, DCM_ReferencedPatientSequence); |
166 } | 166 } |
167 | 167 |
168 | 168 |
169 static void FixFindQuery(DicomMap& target, | |
170 const DicomMap& source) | |
171 { | |
172 // "The definition of a Data Set in PS3.5 specifically excludes | |
173 // the range of groups below group 0008, and this includes in | |
174 // particular Meta Information Header elements such as Transfer | |
175 // Syntax UID (0002,0010)." | |
176 // http://dicom.nema.org/medical/dicom/current/output/chtml/part04/sect_C.4.html#sect_C.4.1.1.3 | |
177 // https://groups.google.com/d/msg/orthanc-users/D3kpPuX8yV0/_zgHOzkMEQAJ | |
178 | |
179 DicomArray a(source); | |
180 | |
181 for (size_t i = 0; i < a.GetSize(); i++) | |
182 { | |
183 if (a.GetElement(i).GetTag().GetGroup() >= 0x0008) | |
184 { | |
185 target.SetValue(a.GetElement(i).GetTag(), a.GetElement(i).GetValue()); | |
186 } | |
187 } | |
188 } | |
189 | |
190 | |
169 | 191 |
170 void FindScpCallback( | 192 void FindScpCallback( |
171 /* in */ | 193 /* in */ |
172 void *callbackData, | 194 void *callbackData, |
173 OFBool cancelled, | 195 OFBool cancelled, |
253 } | 275 } |
254 | 276 |
255 DicomMap input; | 277 DicomMap input; |
256 FromDcmtkBridge::ExtractDicomSummary(input, *requestIdentifiers); | 278 FromDcmtkBridge::ExtractDicomSummary(input, *requestIdentifiers); |
257 | 279 |
258 data.findHandler_->Handle(data.answers_, input, sequencesToReturn, | 280 DicomMap filtered; |
281 FixFindQuery(filtered, input); | |
282 | |
283 data.findHandler_->Handle(data.answers_, filtered, sequencesToReturn, | |
259 *data.remoteIp_, *data.remoteAet_, | 284 *data.remoteIp_, *data.remoteAet_, |
260 *data.calledAet_, modality.GetManufacturer()); | 285 *data.calledAet_, modality.GetManufacturer()); |
261 ok = true; | 286 ok = true; |
262 } | 287 } |
263 else | 288 else |