10 #include "geometrize/core.h"
11 #include "geometrize/bitmap/bitmap.h"
12 #include "geometrize/bitmap/rgba.h"
13 #include "geometrize/shaperesult.h"
14 #include "geometrize/runner/imagerunneroptions.h"
15 #include "geometrize/shape/shape.h"
24 class GeometrizerEngine;
34 Q_DECLARE_METATYPE(std::vector<geometrize::ShapeResult>)
35 Q_DECLARE_METATYPE(geometrize::ImageRunnerOptions)
36 Q_DECLARE_METATYPE(std::function<std::shared_ptr<geometrize::Shape>()>)
37 Q_DECLARE_METATYPE(std::shared_ptr<geometrize::Shape>)
38 Q_DECLARE_METATYPE(geometrize::rgba)
39 Q_DECLARE_METATYPE(geometrize::core::EnergyFunction);
54 ImageTask(Bitmap& target, Qt::ConnectionType workerConnectionType = Qt::QueuedConnection);
55 ImageTask(Bitmap& target, Bitmap& background, Qt::ConnectionType workerConnectionType = Qt::QueuedConnection);
56 ImageTask(
const std::string& displayName, Bitmap& bitmap, Qt::ConnectionType workerConnectionType = Qt::QueuedConnection);
57 ImageTask(
const std::string& displayName, Bitmap& bitmap,
const Bitmap& initial, Qt::ConnectionType workerConnectionType = Qt::QueuedConnection);
85 const Bitmap& getTarget()
const;
91 const Bitmap& getCurrent()
const;
97 std::uint32_t getWidth()
const;
103 std::uint32_t getHeight()
const;
109 std::string getDisplayName()
const;
115 std::size_t getTaskId()
const;
121 bool isStepping()
const;
133 void drawShape(
const std::shared_ptr<geometrize::Shape> shape, geometrize::rgba color);
139 void drawBackgroundRectangle(geometrize::rgba color);
157 void signal_step(geometrize::ImageRunnerOptions options, std::function<std::shared_ptr<geometrize::Shape>()> shapeCreator, geometrize::core::EnergyFunction energyFunction);
164 void signal_drawShape(std::shared_ptr<geometrize::Shape> shape, geometrize::rgba color);
169 void signal_modelWillStep();
175 void signal_modelDidStep(std::vector<geometrize::ShapeResult> shapes);
180 void signal_preferencesSet();
183 void modelWillStep();
184 void modelDidStep(std::vector<geometrize::ShapeResult> shapes);
187 std::unique_ptr<ImageTaskImpl>
d;
The ImageTaskPreferences class models the preferences associated with an image task.
Definition: imagetaskpreferences.h:28
The GeometrizerEngine class encapsulates script-based setup and mutation methods for geometrizing sha...
Definition: geometrizerengine.h:57
std::unique_ptr< ImageTaskImpl > d
Definition: imagetask.h:186
Definition: imagetask.cpp:33
The ImageTask class transforms a source image into a collection of shapes approximating the source im...
Definition: imagetask.h:50