24 #ifndef SEFRAMEWORK_SEFRAMEWORK_IMAGE_INTERPOLATEDIMAGESOURCE_H_
25 #define SEFRAMEWORK_SEFRAMEWORK_IMAGE_INTERPOLATEDIMAGESOURCE_H_
56 int x,
int y,
int width,
int height)
const override {
59 auto chunk_end_x =
x + width;
61 auto chunk_end_y =
y + height;
64 auto chunk_pixel_x =
std::max(chunk_start_x, 0);
65 auto chunk_pixel_y =
std::max(chunk_start_y, 0);
66 auto chunk_w =
std::min(chunk_end_x - chunk_pixel_x, image->getWidth() - chunk_pixel_x);
67 auto chunk_h =
std::min(chunk_end_y - chunk_pixel_y, image->getHeight() - chunk_pixel_y);
71 auto img_chunk = image->getChunk(chunk_pixel_x, chunk_pixel_y, chunk_w, chunk_h);
72 auto variance_chunk =
m_variance_map->getChunk(chunk_pixel_x, chunk_pixel_y, chunk_w, chunk_h);
75 int off_x =
x - chunk_pixel_x;
76 int off_y =
y - chunk_pixel_y;
78 for (
int iy = 0; iy < height; ++iy) {
79 for (
int ix = 0; ix < width; ++ix) {
80 tile_data.at(ix, iy) =
getInterpolatedValue(*img_chunk, *variance_chunk, ix + off_x, iy + off_y);
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > x
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > y