Mercurial > hg > orthanc-stone
changeset 1415:998697c5ec74
Added useProgressiveQuality flag to LoaderCache ctor
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Mon, 11 May 2020 09:50:02 +0200 |
parents | 4f2e14275b09 |
children | d959bc8f6c1b f5493e5a51a3 |
files | Framework/Loaders/LoaderCache.cpp Framework/Loaders/LoaderCache.h |
diffstat | 2 files changed, 11 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/Framework/Loaders/LoaderCache.cpp Mon May 04 18:27:44 2020 +0200 +++ b/Framework/Loaders/LoaderCache.cpp Mon May 11 09:50:02 2020 +0200 @@ -42,8 +42,10 @@ namespace OrthancStone { - LoaderCache::LoaderCache(OrthancStone::ILoadersContext& loadersContext) + LoaderCache::LoaderCache(OrthancStone::ILoadersContext& loadersContext, bool useCtProgressiveQuality) : loadersContext_(loadersContext) + , useCtProgressiveQuality_(useCtProgressiveQuality) + { } @@ -66,7 +68,7 @@ // true means "use progressive quality" // false means "load high quality slices only" - loader = OrthancSeriesVolumeProgressiveLoader::Create(loadersContext_, volumeImage, false); + loader = OrthancSeriesVolumeProgressiveLoader::Create(loadersContext_, volumeImage, useCtProgressiveQuality_); loader->LoadSeries(seriesUuid); seriesVolumeProgressiveLoaders_[seriesUuid] = loader; }
--- a/Framework/Loaders/LoaderCache.h Mon May 04 18:27:44 2020 +0200 +++ b/Framework/Loaders/LoaderCache.h Mon May 11 09:50:02 2020 +0200 @@ -44,7 +44,12 @@ virtual ~LoaderCache() {} - LoaderCache(OrthancStone::ILoadersContext& loadersContext); + /** + By default, the CT loader in loader cache will only download the highest quality slices. + If you pass true for useCtProgressiveQuality, jpeg (50/100 quality), then jpeg (90/100 quality) + then eventually uncompressed 16-bit images will be loaded. + */ + LoaderCache(OrthancStone::ILoadersContext& loadersContext, bool useCtProgressiveQuality = false); boost::shared_ptr<OrthancSeriesVolumeProgressiveLoader> GetSeriesVolumeProgressiveLoader (std::string seriesUuid); @@ -72,6 +77,7 @@ void DebugDisplayObjRefCounts(); OrthancStone::ILoadersContext& loadersContext_; + bool useCtProgressiveQuality_; std::map<std::string, boost::shared_ptr<OrthancSeriesVolumeProgressiveLoader> > seriesVolumeProgressiveLoaders_;