comparison Core/DicomParsing/MemoryBufferTranscoder.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 1f33ed7f82e6
children
comparison
equal deleted inserted replaced
3950:5797ca4f3b8d 3951:5fe8c6d3212e
65 #endif 65 #endif
66 } 66 }
67 67
68 68
69 bool MemoryBufferTranscoder::Transcode(DicomImage& target, 69 bool MemoryBufferTranscoder::Transcode(DicomImage& target,
70 bool& hasSopInstanceUidChanged /* out */,
71 DicomImage& source, 70 DicomImage& source,
72 const std::set<DicomTransferSyntax>& allowedSyntaxes, 71 const std::set<DicomTransferSyntax>& allowedSyntaxes,
73 bool allowNewSopInstanceUid) 72 bool allowNewSopInstanceUid)
74 { 73 {
75 target.Clear(); 74 target.Clear();
85 84
86 const std::string sourceSopInstanceUid = GetSopInstanceUid(source.GetParsed()); 85 const std::string sourceSopInstanceUid = GetSopInstanceUid(source.GetParsed());
87 #endif 86 #endif
88 87
89 std::string buffer; 88 std::string buffer;
90 if (TranscodeBuffer(buffer, hasSopInstanceUidChanged, source.GetBufferData(), 89 if (TranscodeBuffer(buffer, source.GetBufferData(), source.GetBufferSize(),
91 source.GetBufferSize(), allowedSyntaxes, allowNewSopInstanceUid)) 90 allowedSyntaxes, allowNewSopInstanceUid))
92 { 91 {
93 CheckTargetSyntax(buffer, allowedSyntaxes); // For debug only 92 CheckTargetSyntax(buffer, allowedSyntaxes); // For debug only
94 93
95 target.AcquireBuffer(buffer); 94 target.AcquireBuffer(buffer);
96 95
97 #if !defined(NDEBUG) 96 #if !defined(NDEBUG)
98 // Only run the sanity check in debug mode 97 // Only run the sanity check in debug mode
99 CheckTranscoding(target, hasSopInstanceUidChanged, sourceSyntax, sourceSopInstanceUid, 98 CheckTranscoding(target, sourceSyntax, sourceSopInstanceUid,
100 allowedSyntaxes, allowNewSopInstanceUid); 99 allowedSyntaxes, allowNewSopInstanceUid);
101 #endif 100 #endif
102 101
103 return true; 102 return true;
104 } 103 }