comparison OrthancStone/Sources/Loaders/BasicFetchingStrategy.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 9ac2a65d4172
children 3889ae96d2e9
comparison
equal deleted inserted replaced
1754:34ab7f643327 1755:1a775f4ee672
40 } 40 }
41 } 41 }
42 42
43 43
44 BasicFetchingStrategy::BasicFetchingStrategy(IFetchingItemsSorter* sorter, // Takes ownership 44 BasicFetchingStrategy::BasicFetchingStrategy(IFetchingItemsSorter* sorter, // Takes ownership
45 unsigned int maxQuality) : 45 unsigned int maxQuality,
46 unsigned int initialItem) :
46 sorter_(sorter), 47 sorter_(sorter),
47 maxQuality_(maxQuality), 48 maxQuality_(maxQuality),
48 position_(0), 49 position_(0),
49 blockSize_(2) 50 blockSize_(2)
50 { 51 {
53 throw Orthanc::OrthancException(Orthanc::ErrorCode_NullPointer); 54 throw Orthanc::OrthancException(Orthanc::ErrorCode_NullPointer);
54 } 55 }
55 56
56 nextQuality_.resize(sorter_->GetItemsCount(), 0); // Does not change along calls to "SetCurrent()" 57 nextQuality_.resize(sorter_->GetItemsCount(), 0); // Does not change along calls to "SetCurrent()"
57 58
58 SetCurrent(0); 59 SetCurrent(initialItem);
59 } 60 }
60 61
61 62
62 void BasicFetchingStrategy::SetBlockSize(unsigned int size) 63 void BasicFetchingStrategy::SetBlockSize(unsigned int size)
63 { 64 {