comparison OrthancServer/Sources/OrthancGetRequestHandler.cpp @ 4376:b002f9abe802 varian

review of changeset 4375:208029732d51
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 17 Dec 2020 11:27:37 +0100
parents 208029732d51
children d9473bd5ed43
comparison
equal deleted inserted replaced
4375:208029732d51 4376:b002f9abe802
505 { 505 {
506 if (!query.GetElement(i).GetValue().IsNull()) 506 if (!query.GetElement(i).GetValue().IsNull())
507 { 507 {
508 CLOG(INFO, DICOM) << " (" << query.GetElement(i).GetTag().Format() 508 CLOG(INFO, DICOM) << " (" << query.GetElement(i).GetTag().Format()
509 << ") " << FromDcmtkBridge::GetTagName(query.GetElement(i)) 509 << ") " << FromDcmtkBridge::GetTagName(query.GetElement(i))
510 << " = " << context_.GetDeidentifiedQueryContent(query.GetElement(i)); 510 << " = " << context_.GetDeidentifiedContent(query.GetElement(i));
511 } 511 }
512 } 512 }
513 } 513 }
514 514
515 /** 515 /**
516 * Retrieve the query level. 516 * Retrieve the query level.
517 **/ 517 **/
518 518
519 const DicomValue* levelTmp = input.TestAndGetValue(DICOM_TAG_QUERY_RETRIEVE_LEVEL); 519 const DicomValue* levelTmp = input.TestAndGetValue(DICOM_TAG_QUERY_RETRIEVE_LEVEL);
520 520 if (levelTmp == NULL ||
521 assert(levelTmp != NULL); 521 levelTmp->IsNull() ||
522 levelTmp->IsBinary())
523 {
524 throw OrthancException(ErrorCode_BadRequest,
525 "C-GET request without the tag 0008,0052 (QueryRetrieveLevel)");
526 }
527
522 ResourceType level = StringToResourceType(levelTmp->GetContent().c_str()); 528 ResourceType level = StringToResourceType(levelTmp->GetContent().c_str());
523 529
524 530
525 /** 531 /**
526 * Lookup for the resource to be sent. 532 * Lookup for the resource to be sent.