void verifyImagePixels(const ImageType& image, unsigned int startX, unsigned int startY, unsigned int endX, unsigned int endY, ImageFunction expectedPixels) { for (auto x = startX; x < endX; ++x) { for (auto y = startY; y < endY; ++y) { auto pixelValue = image.getPixelValue(x, y); auto expectedPixelValue = expectedPixels(x, y); assertThat(pixelValue).isEqualTo(expectedPixelValue); } } }
PixelType getPixelValue(const ImageType& image, unsigned int x, unsigned int y) override { auto coordinate = Coordinate(x, y); return image.getPixelValue(coordinate); }