comparison OrthancServer/Sources/DicomInstanceToStore.cpp @ 4385:92737070b301

If meta-header is missing, best-effort to extract "TransferSyntax" in "/instances/{id}/metadata"
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 18 Dec 2020 11:48:40 +0100
parents 0ddc5297a8ab
children d9473bd5ed43
comparison
equal deleted inserted replaced
4384:7e0d015ad109 4385:92737070b301
371 { 371 {
372 result = Toolbox::StripSpaces(value->GetContent()); 372 result = Toolbox::StripSpaces(value->GetContent());
373 return true; 373 return true;
374 } 374 }
375 } 375 }
376 else
377 {
378 // This is a DICOM file without a proper meta-header. Fallback
379 // to DCMTK, which will fully parse the dataset to retrieve
380 // the transfer syntax. Added in Orthanc 1.8.2.
381 std::string transferSyntax;
382 if (GetParsedDicomFile().LookupTransferSyntax(transferSyntax))
383 {
384 result = Toolbox::StripSpaces(transferSyntax);
385 return true;
386 }
387 }
376 388
377 return false; 389 return false;
378 } 390 }
379 391
380 392