comparison Core/DicomNetworking/DicomStoreUserConnection.cpp @ 3951:5fe8c6d3212e transcoding

removed useless information "hasSopInstanceUidChanged"
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 19 May 2020 21:06:53 +0200
parents 0b3256c3ee14
children
comparison
equal deleted inserted replaced
3950:5797ca4f3b8d 3951:5fe8c6d3212e
492 } 492 }
493 493
494 IDicomTranscoder::DicomImage source; 494 IDicomTranscoder::DicomImage source;
495 source.AcquireParsed(dicom.release()); 495 source.AcquireParsed(dicom.release());
496 source.SetExternalBuffer(buffer, size); 496 source.SetExternalBuffer(buffer, size);
497
498 const std::string sourceUid = IDicomTranscoder::GetSopInstanceUid(source.GetParsed());
497 499
498 IDicomTranscoder::DicomImage transcoded; 500 IDicomTranscoder::DicomImage transcoded;
499 bool hasSopInstanceUidChanged; 501 if (transcoder.Transcode(transcoded, source, uncompressedSyntaxes, false))
500 if (transcoder.Transcode(transcoded, hasSopInstanceUidChanged, source, uncompressedSyntaxes, false)) 502 {
501 { 503 if (sourceUid != IDicomTranscoder::GetSopInstanceUid(transcoded.GetParsed()))
502 if (hasSopInstanceUidChanged)
503 { 504 {
504 throw OrthancException(ErrorCode_Plugin, "The transcoder has changed the SOP " 505 throw OrthancException(ErrorCode_Plugin, "The transcoder has changed the SOP "
505 "instance UID while transcoding to an uncompressed transfer syntax"); 506 "instance UID while transcoding to an uncompressed transfer syntax");
506 } 507 }
507 else 508 else