9#include "../shaperesult.h"
14class ImageRunnerOptions;
54 std::function<std::shared_ptr<geometrize::Shape>()> shapeCreator =
nullptr,
90 std::unique_ptr<ImageRunner::ImageRunnerImpl>
d;
The Bitmap class is a helper class for working with bitmap data.
Definition: bitmap.h:16
Definition: imagerunner.cpp:20
The ImageRunner class is a helper class for creating a set of primitives from a source image.
Definition: imagerunner.h:26
ImageRunner(const geometrize::Bitmap &targetBitmap)
ImageRunner Creates an new image runner with the given target bitmap. Uses the average color of the t...
Definition: imagerunner.cpp:73
geometrize::Bitmap & getCurrent()
getCurrent Gets the current bitmap with the primitives drawn on it.
Definition: imagerunner.cpp:92
~ImageRunner()
Definition: imagerunner.cpp:81
std::unique_ptr< ImageRunner::ImageRunnerImpl > d
Definition: imagerunner.h:90
ImageRunner & operator=(const ImageRunner &)=delete
ImageRunner(const ImageRunner &)=delete
geometrize::Bitmap & getTarget()
getTarget Gets the target bitmap.
Definition: imagerunner.cpp:97
geometrize::Model & getModel()
getModel Gets the underlying model.
Definition: imagerunner.cpp:112
std::vector< geometrize::ShapeResult > step(const geometrize::ImageRunnerOptions &options, std::function< std::shared_ptr< geometrize::Shape >()> shapeCreator=nullptr, geometrize::core::EnergyFunction energyFunction=nullptr, geometrize::ShapeAcceptancePreconditionFunction addShapePrecondition=nullptr)
step Updates the internal model once.
Definition: imagerunner.cpp:84
The ImageRunnerOptions class encapsulates preferences/options that the image runner uses.
Definition: imagerunneroptions.h:28
The Model class is the model for the core optimization/fitting algorithm.
Definition: model.h:48
std::function< double(const std::vector< geometrize::Scanline > &lines, const std::uint32_t alpha, const geometrize::Bitmap &target, const geometrize::Bitmap ¤t, geometrize::Bitmap &buffer, double score)> EnergyFunction
EnergyFunction Type alias for a function that calculates a measure of the improvement adding the scan...
Definition: core.h:44
std::function< bool(double lastScore, double newScore, const geometrize::Shape &shape, const std::vector< geometrize::Scanline > &lines, const geometrize::rgba &color, const geometrize::Bitmap &before, const geometrize::Bitmap &after, const geometrize::Bitmap &target)> ShapeAcceptancePreconditionFunction
ShapeAcceptancePreconditionFunction Type alias for a function that is used to decide whether or not t...
Definition: model.h:41