Mercurial > hg > orthanc-stone
diff OrthancStone/Sources/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp @ 1755:1a775f4ee672
added ability to specify initial slice in
BasicFetchingStrategy and using it
in OrthancSeriesVolumeProgressiveLoader
author | bgo@SHARKNADO.localdomain |
---|---|
date | Mon, 26 Apr 2021 12:05:40 +0200 |
parents | 946eb7200b82 |
children | 4ee11b8773e2 |
line wrap: on
line diff
--- a/OrthancStone/Sources/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp Mon Apr 26 12:05:02 2021 +0200 +++ b/OrthancStone/Sources/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp Mon Apr 26 12:05:40 2021 +0200 @@ -397,9 +397,14 @@ if (progressiveQuality_) maxQuality = QUALITY_02; + unsigned int initialSlice = 0; + if (startCenter_) + initialSlice = static_cast<unsigned int>(slicesCount) / 2; + strategy_.reset(new BasicFetchingStrategy( sorter_->CreateSorter(static_cast<unsigned int>(slicesCount)), - maxQuality)); + maxQuality, + initialSlice)); assert(simultaneousDownloads_ != 0); for (unsigned int i = 0; i < simultaneousDownloads_; i++) @@ -528,6 +533,7 @@ : loadersContext_(loadersContext) , active_(false) , progressiveQuality_(progressiveQuality) + , startCenter_(false) , simultaneousDownloads_(4) , volume_(volume) , sorter_(new BasicFetchingItemsSorter::Factory) @@ -568,6 +574,11 @@ OrthancSeriesVolumeProgressiveLoader::~OrthancSeriesVolumeProgressiveLoader() { LOG(TRACE) << "OrthancSeriesVolumeProgressiveLoader::~OrthancSeriesVolumeProgressiveLoader()"; + } + + void OrthancSeriesVolumeProgressiveLoader::SetStartCenter(bool startCenter) + { + startCenter_ = startCenter; } void OrthancSeriesVolumeProgressiveLoader::SetSimultaneousDownloads(unsigned int count)