Skip to content

Commit

Permalink
Update philipsslide.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
AzHicham authored Jan 27, 2024
1 parent 9dcad3e commit e151948
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cpp/philipsslide.cc
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,13 @@ void ImageView::read_region(const std::unique_ptr<PhilipsEngine>& engine, const
const std::vector<std::vector<std::size_t>> view_range{
{request.roi.start_x, request.roi.end_x, request.roi.start_y, request.roi.end_y, request.level}};
auto const& envelopes = _view.dataEnvelopes(request.level);
auto regions = _view.requestRegions(view_range, envelopes, true, {254, 254, 254}, BufferType::RGB);
auto region = _view.requestRegions(view_range, envelopes, true, {254, 254, 254}, BufferType::RGB);

auto regions_ready = engine.get()->inner()->waitAll(regions);
auto region = regions_ready.front();
engine.get()->inner()->waitAll(region);

// compute image size
const auto dimension_range = dimensionRanges(request.level);
const auto& range = region->range();
const auto& range = region[0]->range();
image_size.w = 1 + ((range[1] - range[0]) / dimension_range.step_x);
image_size.h = 1 + ((range[3] - range[2]) / dimension_range.step_y);
const size_t nb_sub_pixels = image_size.w * image_size.h * 3;
Expand Down

0 comments on commit e151948

Please sign in to comment.