comparison OrthancServer/Sources/ServerIndex.cpp @ 4507:b4c58795f3a8

widening the use of DicomTransferSyntax enum
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 11 Feb 2021 09:33:48 +0100
parents ac69c9f76c71
children 5b929e6b3c36
comparison
equal deleted inserted replaced
4506:ac69c9f76c71 4507:b4c58795f3a8
759 const Attachments& attachments, 759 const Attachments& attachments,
760 const MetadataMap& metadata, 760 const MetadataMap& metadata,
761 const DicomInstanceOrigin& origin, 761 const DicomInstanceOrigin& origin,
762 bool overwrite, 762 bool overwrite,
763 bool hasTransferSyntax, 763 bool hasTransferSyntax,
764 const std::string& transferSyntax, 764 DicomTransferSyntax transferSyntax,
765 bool hasPixelDataOffset, 765 bool hasPixelDataOffset,
766 uint64_t pixelDataOffset) 766 uint64_t pixelDataOffset)
767 { 767 {
768 boost::mutex::scoped_lock lock(mutex_); 768 boost::mutex::scoped_lock lock(mutex_);
769 769
944 944
945 if (hasTransferSyntax) 945 if (hasTransferSyntax)
946 { 946 {
947 // New in Orthanc 1.2.0 947 // New in Orthanc 1.2.0
948 SetInstanceMetadata(content, instanceMetadata, instanceId, 948 SetInstanceMetadata(content, instanceMetadata, instanceId,
949 MetadataType_Instance_TransferSyntax, transferSyntax); 949 MetadataType_Instance_TransferSyntax,
950 GetTransferSyntaxUid(transferSyntax));
950 } 951 }
951 952
952 { 953 {
953 std::string s; 954 std::string s;
954 955
2530 content.AddResource(instance, ResourceType_Instance, summary); 2531 content.AddResource(instance, ResourceType_Instance, summary);
2531 db_.SetResourcesContent(content); 2532 db_.SetResourcesContent(content);
2532 } 2533 }
2533 2534
2534 { 2535 {
2535 std::string s; 2536 DicomTransferSyntax s;
2536 if (dicom.LookupTransferSyntax(s)) 2537 if (dicom.LookupTransferSyntax(s))
2537 { 2538 {
2538 db_.SetMetadata(instance, MetadataType_Instance_TransferSyntax, s); 2539 db_.SetMetadata(instance, MetadataType_Instance_TransferSyntax, GetTransferSyntaxUid(s));
2539 } 2540 }
2540 } 2541 }
2541 2542
2542 const DicomValue* value; 2543 const DicomValue* value;
2543 if ((value = summary.TestAndGetValue(DICOM_TAG_SOP_CLASS_UID)) != NULL && 2544 if ((value = summary.TestAndGetValue(DICOM_TAG_SOP_CLASS_UID)) != NULL &&