Mercurial > hg > orthanc
comparison OrthancServer/UnitTestsSources/ServerJobsTests.cpp @ 4508:8f9090b137f1
Optimization in C-STORE SCP by avoiding an unnecessary DICOM parsing
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 11 Feb 2021 11:00:05 +0100 |
parents | d9473bd5ed43 |
children | 2e850edf03d6 |
comparison
equal
deleted
inserted
replaced
4507:b4c58795f3a8 | 4508:8f9090b137f1 |
---|---|
533 // Create a sample DICOM file | 533 // Create a sample DICOM file |
534 ParsedDicomFile dicom(true); | 534 ParsedDicomFile dicom(true); |
535 dicom.Replace(DICOM_TAG_PATIENT_NAME, std::string("JODOGNE"), | 535 dicom.Replace(DICOM_TAG_PATIENT_NAME, std::string("JODOGNE"), |
536 false, DicomReplaceMode_InsertIfAbsent, ""); | 536 false, DicomReplaceMode_InsertIfAbsent, ""); |
537 | 537 |
538 DicomInstanceToStore toStore; | 538 std::unique_ptr<DicomInstanceToStore> toStore(DicomInstanceToStore::CreateFromParsedDicomFile(dicom)); |
539 toStore.SetParsedDicomFile(dicom); | 539 |
540 | 540 return (context_->Store(id, *toStore, StoreInstanceMode_Default) == StoreStatus_Success); |
541 return (context_->Store(id, toStore, StoreInstanceMode_Default) == StoreStatus_Success); | |
542 } | 541 } |
543 }; | 542 }; |
544 } | 543 } |
545 | 544 |
546 | 545 |