diff --git a/cpp/philipsslide.cc b/cpp/philipsslide.cc index bf55712..55913ff 100644 --- a/cpp/philipsslide.cc +++ b/cpp/philipsslide.cc @@ -210,14 +210,13 @@ void ImageView::read_region(const std::unique_ptr& engine, const const std::vector> 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;