Mercurial > hg > orthanc
comparison OrthancServer/OrthancRestApi/OrthancRestResources.cpp @ 2012:50b9bc19dc62
More than one custom image decoder can be installed (e.g. to handle different transfer syntaxes)
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 10 Jun 2016 17:54:26 +0200 |
parents | 655489d9165d |
children | 4b02ec79728a |
comparison
equal
deleted
inserted
replaced
2011:5b3b2de4e018 | 2012:50b9bc19dc62 |
---|---|
378 if (context.GetPlugins().HasCustomImageDecoder()) | 378 if (context.GetPlugins().HasCustomImageDecoder()) |
379 { | 379 { |
380 // TODO create a cache of file | 380 // TODO create a cache of file |
381 std::string dicomContent; | 381 std::string dicomContent; |
382 context.ReadFile(dicomContent, publicId, FileContentType_Dicom); | 382 context.ReadFile(dicomContent, publicId, FileContentType_Dicom); |
383 decoded.reset(context.GetPlugins().Decode(dicomContent.c_str(), dicomContent.size(), frame)); | 383 decoded.reset(context.GetPlugins().DecodeUnsafe(dicomContent.c_str(), dicomContent.size(), frame)); |
384 | |
385 /** | |
386 * Note that we call "DecodeUnsafe()": We do not fallback to | |
387 * the builtin decoder if no installed decoder plugin is able | |
388 * to decode the image. This allows us to take advantage of | |
389 * the cache below. | |
390 **/ | |
384 } | 391 } |
385 #endif | 392 #endif |
386 | 393 |
387 if (decoded.get() == NULL) | 394 if (decoded.get() == NULL) |
388 { | 395 { |