comparison Plugins/Engine/OrthancPlugins.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 821715370890
comparison
equal deleted inserted replaced
3950:5797ca4f3b8d 3951:5fe8c6d3212e
4374 4374
4375 IDicomTranscoder::DicomImage source; 4375 IDicomTranscoder::DicomImage source;
4376 source.SetExternalBuffer(p.buffer, p.size); 4376 source.SetExternalBuffer(p.buffer, p.size);
4377 4377
4378 IDicomTranscoder::DicomImage transcoded; 4378 IDicomTranscoder::DicomImage transcoded;
4379 bool success, hasSopInstanceChanged; 4379 bool success;
4380 4380
4381 { 4381 {
4382 PImpl::ServerContextLock lock(*pimpl_); 4382 PImpl::ServerContextLock lock(*pimpl_);
4383 success = lock.GetContext().Transcode(transcoded, hasSopInstanceChanged, source, 4383 success = lock.GetContext().Transcode(
4384 syntaxes, true /* allow new sop */); 4384 transcoded, source, syntaxes, true /* allow new sop */);
4385 } 4385 }
4386 4386
4387 if (success) 4387 if (success)
4388 { 4388 {
4389 *(p.target) = reinterpret_cast<OrthancPluginDicomInstance*>( 4389 *(p.target) = reinterpret_cast<OrthancPluginDicomInstance*>(
5212 } 5212 }
5213 }; 5213 };
5214 5214
5215 5215
5216 bool OrthancPlugins::TranscodeBuffer(std::string& target, 5216 bool OrthancPlugins::TranscodeBuffer(std::string& target,
5217 bool& hasSopInstanceUidChanged /* out */,
5218 const void* buffer, 5217 const void* buffer,
5219 size_t size, 5218 size_t size,
5220 const std::set<DicomTransferSyntax>& allowedSyntaxes, 5219 const std::set<DicomTransferSyntax>& allowedSyntaxes,
5221 bool allowNewSopInstanceUid) 5220 bool allowNewSopInstanceUid)
5222 { 5221 {
5238 for (PImpl::TranscoderCallbacks::const_iterator 5237 for (PImpl::TranscoderCallbacks::const_iterator
5239 transcoder = pimpl_->transcoderCallbacks_.begin(); 5238 transcoder = pimpl_->transcoderCallbacks_.begin();
5240 transcoder != pimpl_->transcoderCallbacks_.end(); ++transcoder) 5239 transcoder != pimpl_->transcoderCallbacks_.end(); ++transcoder)
5241 { 5240 {
5242 MemoryBufferRaii a; 5241 MemoryBufferRaii a;
5243 uint8_t b; 5242
5244 5243 if ((*transcoder) (a.GetObject(), buffer, size, uids.empty() ? NULL : &uids[0],
5245 if ((*transcoder) (a.GetObject(), &b, buffer, size, uids.empty() ? NULL : &uids[0],
5246 static_cast<uint32_t>(uids.size()), allowNewSopInstanceUid) == 5244 static_cast<uint32_t>(uids.size()), allowNewSopInstanceUid) ==
5247 OrthancPluginErrorCode_Success) 5245 OrthancPluginErrorCode_Success)
5248 { 5246 {
5249 a.ToString(target); 5247 a.ToString(target);
5250 hasSopInstanceUidChanged = b;
5251 return true; 5248 return true;
5252 } 5249 }
5253 } 5250 }
5254 5251
5255 return false; 5252 return false;