Mercurial > hg > orthanc
comparison Core/DicomFormat/DicomMap.cpp @ 567:c2be0a0e049e find-move-scp
cont
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 19 Sep 2013 17:43:38 +0200 |
parents | f64e3838d6e1 |
children | 08eca5d86aad |
comparison
equal
deleted
inserted
replaced
565:c931ac02db82 | 567:c2be0a0e049e |
---|---|
329 return (IsMainDicomTag(tag, ResourceType_Patient) || | 329 return (IsMainDicomTag(tag, ResourceType_Patient) || |
330 IsMainDicomTag(tag, ResourceType_Study) || | 330 IsMainDicomTag(tag, ResourceType_Study) || |
331 IsMainDicomTag(tag, ResourceType_Series) || | 331 IsMainDicomTag(tag, ResourceType_Series) || |
332 IsMainDicomTag(tag, ResourceType_Instance)); | 332 IsMainDicomTag(tag, ResourceType_Instance)); |
333 } | 333 } |
334 | |
335 | |
336 void DicomMap::GetMainDicomTagsInternal(std::set<DicomTag>& result, ResourceType level) | |
337 { | |
338 DicomTag *tags = NULL; | |
339 size_t size; | |
340 | |
341 switch (level) | |
342 { | |
343 case ResourceType_Patient: | |
344 tags = patientTags; | |
345 size = sizeof(patientTags) / sizeof(DicomTag); | |
346 break; | |
347 | |
348 case ResourceType_Study: | |
349 tags = studyTags; | |
350 size = sizeof(studyTags) / sizeof(DicomTag); | |
351 break; | |
352 | |
353 case ResourceType_Series: | |
354 tags = seriesTags; | |
355 size = sizeof(seriesTags) / sizeof(DicomTag); | |
356 break; | |
357 | |
358 case ResourceType_Instance: | |
359 tags = instanceTags; | |
360 size = sizeof(instanceTags) / sizeof(DicomTag); | |
361 break; | |
362 | |
363 default: | |
364 throw OrthancException(ErrorCode_ParameterOutOfRange); | |
365 } | |
366 | |
367 for (size_t i = 0; i < size; i++) | |
368 { | |
369 result.insert(tags[i]); | |
370 } | |
371 } | |
372 | |
373 | |
374 void DicomMap::GetMainDicomTags(std::set<DicomTag>& result, ResourceType level) | |
375 { | |
376 result.clear(); | |
377 GetMainDicomTagsInternal(result, level); | |
378 } | |
379 | |
380 | |
381 void DicomMap::GetMainDicomTags(std::set<DicomTag>& result) | |
382 { | |
383 result.clear(); | |
384 GetMainDicomTagsInternal(result, ResourceType_Patient); | |
385 GetMainDicomTagsInternal(result, ResourceType_Study); | |
386 GetMainDicomTagsInternal(result, ResourceType_Series); | |
387 GetMainDicomTagsInternal(result, ResourceType_Instance); | |
388 } | |
334 } | 389 } |