32 {
35
36 if(!shapeCreator) {
38 }
39
42 }
std::uint32_t shapeCount
The number of candidate shapes that will be tried per model step.
Definition: imagerunneroptions.h:32
std::uint32_t seed
The seed for the random number generators used by the image runner.
Definition: imagerunneroptions.h:34
geometrize::ShapeTypes shapeTypes
The shape types that the image runner shall use.
Definition: imagerunneroptions.h:30
std::uint32_t maxShapeMutations
The maximum number of times each candidate shape will be modified to attempt to find a better fit.
Definition: imagerunneroptions.h:33
ImageRunnerShapeBoundsOptions shapeBounds
If zero or do not form a rectangle, the entire target image is used i.e. (0, 0, imageWidth,...
Definition: imagerunneroptions.h:36
std::uint8_t alpha
The alpha/opacity of the shapes (0-255).
Definition: imagerunneroptions.h:31
std::uint32_t maxThreads
The maximum number of separate threads for the implementation to use. 0 lets the implementation choos...
Definition: imagerunneroptions.h:35
void setSeed(std::uint32_t seed)
setSeed Sets the seed that the random number generators of this model use. Note that the model also u...
Definition: model.cpp:282
std::vector< geometrize::ShapeResult > step(const std::function< std::shared_ptr< geometrize::Shape >(void)> &shapeCreator, std::uint8_t alpha, std::uint32_t shapeCount, std::uint32_t maxShapeMutations, std::uint32_t maxThreads, const geometrize::core::EnergyFunction &energyFunction=nullptr, const geometrize::ShapeAcceptancePreconditionFunction &addShapePrecondition=nullptr)
step Steps the primitive optimization/fitting algorithm.
Definition: model.cpp:245
std::tuple< std::int32_t, std::int32_t, std::int32_t, std::int32_t > mapShapeBoundsToImage(const geometrize::ImageRunnerShapeBoundsOptions &options, const geometrize::Bitmap &image)
mapShapeBoundsToImage Maps the given shape bound percentages to the given image, returning a bounding...
Definition: commonutil.cpp:75
ShapeTypes
The ShapeTypes enum specifies the types of shapes that can be used. These can be combined to produce ...
Definition: shapetypes.h:17
std::function< std::shared_ptr< geometrize::Shape >()> createDefaultShapeCreator(const geometrize::ShapeTypes types, const std::int32_t xMin, const std::int32_t yMin, const std::int32_t xMax, const std::int32_t yMax)
createDefaultShapeCreator Creates an instance of the default shape creator object....
Definition: shapefactory.cpp:25