The ImageTask class transforms a source image into a collection of shapes approximating the source image.
More...
#include <imagetask.h>
|
| void | signal_step (geometrize::ImageRunnerOptions options, std::function< std::shared_ptr< geometrize::Shape >()> shapeCreator, geometrize::core::EnergyFunction energyFunction, geometrize::ShapeAcceptancePreconditionFunction addShapePrecondition) |
| | signal_step Signal that the image task emits to make the internal model step. More...
|
| |
| void | signal_drawShape (std::shared_ptr< geometrize::Shape > shape, geometrize::rgba color) |
| | signal_drawShape Signal that the image task emits to draw a shape to the internal model. More...
|
| |
| void | signal_modelWillStep () |
| | signal_modelWillStep Signal that is emitted immediately before the underlying image task model is stepped. More...
|
| |
| void | signal_modelDidStep (std::vector< geometrize::ShapeResult > shapes) |
| | signal_modelDidStep Signal that is emitted immediately after the underlying image task model is stepped. More...
|
| |
| void | signal_preferencesSet () |
| | signal_preferencesSet Signal that is emitted immediately after the image task preferences are set. More...
|
| |
|
| | ImageTask (Bitmap &target, Qt::ConnectionType workerConnectionType=Qt::QueuedConnection) |
| |
| | ImageTask (Bitmap &target, Bitmap &background, Qt::ConnectionType workerConnectionType=Qt::QueuedConnection) |
| |
| | ImageTask (const std::string &displayName, Bitmap &bitmap, Qt::ConnectionType workerConnectionType=Qt::QueuedConnection) |
| |
| | ImageTask (const std::string &displayName, Bitmap &bitmap, const Bitmap &initial, Qt::ConnectionType workerConnectionType=Qt::QueuedConnection) |
| |
| ImageTask & | operator= (const ImageTask &)=delete |
| |
| | ImageTask (const ImageTask &)=delete |
| |
| virtual | ~ImageTask () |
| |
| geometrize::script::GeometrizerEngine & | getGeometrizer () |
| | getGeometrizer Gets a reference to the script-based engine used to turn images into shapes. More...
|
| |
| Bitmap & | getTargetMutable () |
| | getTarget Gets the target bitmap, non-const edition. More...
|
| |
| Bitmap & | getCurrentMutable () |
| | getCurrent Gets the current bitmap, non-const edition. More...
|
| |
| const Bitmap & | getTarget () const |
| | getTarget Gets the target bitmap, const-edition. More...
|
| |
| const Bitmap & | getCurrent () const |
| | getCurrent Gets the current bitmap, const-edition. More...
|
| |
| std::uint32_t | getWidth () const |
| | getWidth Gets the width of the images used by the image task. More...
|
| |
| std::uint32_t | getHeight () const |
| | getHeight Gets the height of the images used by the image task. More...
|
| |
| std::string | getDisplayName () const |
| | getDisplayName Gets the display name of the image task. More...
|
| |
| std::size_t | getTaskId () const |
| | getTaskId Gets the unique id of the image task. More...
|
| |
| bool | isStepping () const |
| | isStepping Returns true if the internal model is currently stepping. More...
|
| |
| void | stepModel () |
| | stepModel Steps the internal model, typically adding a shape. More...
|
| |
| void | drawShape (const std::shared_ptr< geometrize::Shape > shape, geometrize::rgba color) |
| | drawShape Draws a shape with the given color to the internal model. More...
|
| |
| void | drawBackgroundRectangle (geometrize::rgba color) |
| | drawBackgroundRectangle Convenience function that draws a background rectangle shape. More...
|
| |
| geometrize::preferences::ImageTaskPreferences & | getPreferences () |
| | getPreferences Gets a reference to the current preferences of this task. More...
|
| |
| void | setPreferences (preferences::ImageTaskPreferences preferences) |
| | setPreferences Sets the preferences for this task. More...
|
| |
The ImageTask class transforms a source image into a collection of shapes approximating the source image.
◆ ImageTask() [1/5]
| geometrize::task::ImageTask::ImageTask |
( |
Bitmap & |
target, |
|
|
Qt::ConnectionType |
workerConnectionType = Qt::QueuedConnection |
|
) |
| |
299 d{std::make_unique<ImageTask::ImageTaskImpl>(
this,
"", target, workerConnectionType)}
◆ ImageTask() [2/5]
| geometrize::task::ImageTask::ImageTask |
( |
Bitmap & |
target, |
|
|
Bitmap & |
background, |
|
|
Qt::ConnectionType |
workerConnectionType = Qt::QueuedConnection |
|
) |
| |
304 d{std::make_unique<ImageTask::ImageTaskImpl>(
this,
"", target, background, workerConnectionType)}
◆ ImageTask() [3/5]
| geometrize::task::ImageTask::ImageTask |
( |
const std::string & |
displayName, |
|
|
Bitmap & |
bitmap, |
|
|
Qt::ConnectionType |
workerConnectionType = Qt::QueuedConnection |
|
) |
| |
309 d{std::make_unique<ImageTask::ImageTaskImpl>(
this, displayName, bitmap, workerConnectionType)}
◆ ImageTask() [4/5]
| geometrize::task::ImageTask::ImageTask |
( |
const std::string & |
displayName, |
|
|
Bitmap & |
bitmap, |
|
|
const Bitmap & |
initial, |
|
|
Qt::ConnectionType |
workerConnectionType = Qt::QueuedConnection |
|
) |
| |
314 d{std::make_unique<ImageTask::ImageTaskImpl>(
this, displayName, bitmap, initial, workerConnectionType)}
◆ ImageTask() [5/5]
| geometrize::task::ImageTask::ImageTask |
( |
const ImageTask & |
| ) |
|
|
delete |
◆ ~ImageTask()
| geometrize::task::ImageTask::~ImageTask |
( |
| ) |
|
|
virtual |
◆ drawBackgroundRectangle()
| void geometrize::task::ImageTask::drawBackgroundRectangle |
( |
geometrize::rgba |
color | ) |
|
drawBackgroundRectangle Convenience function that draws a background rectangle shape.
- Parameters
-
| color | The color of the background rectangle. |
379 d->drawBackgroundRectangle(color);
◆ drawShape()
| void geometrize::task::ImageTask::drawShape |
( |
const std::shared_ptr< geometrize::Shape > |
shape, |
|
|
geometrize::rgba |
color |
|
) |
| |
drawShape Draws a shape with the given color to the internal model.
- Parameters
-
| shape | The shape to add to the model. |
| color | The color of the shape. |
374 d->drawShape(shape, color);
◆ getCurrent()
| const Bitmap & geometrize::task::ImageTask::getCurrent |
( |
| ) |
const |
getCurrent Gets the current bitmap, const-edition.
- Returns
- The current bitmap.
339 return d->getCurrent();
◆ getCurrentMutable()
| Bitmap & geometrize::task::ImageTask::getCurrentMutable |
( |
| ) |
|
getCurrent Gets the current bitmap, non-const edition.
- Returns
- The current bitmap.
329 return d->getCurrent();
◆ getDisplayName()
| std::string geometrize::task::ImageTask::getDisplayName |
( |
| ) |
const |
getDisplayName Gets the display name of the image task.
- Returns
- The display name of the image task.
354 return d->getDisplayName();
◆ getGeometrizer()
getGeometrizer Gets a reference to the script-based engine used to turn images into shapes.
- Returns
- The script-based engine used to turn images into shapes.
404 return d->getGeometrizer();
◆ getHeight()
| std::uint32_t geometrize::task::ImageTask::getHeight |
( |
| ) |
const |
getHeight Gets the height of the images used by the image task.
- Returns
- The height of the images used by the image task.
349 return d->getHeight();
◆ getPreferences()
getPreferences Gets a reference to the current preferences of this task.
- Returns
- A reference to the current preferences of this task.
394 return d->getPreferences();
◆ getTarget()
| const Bitmap & geometrize::task::ImageTask::getTarget |
( |
| ) |
const |
getTarget Gets the target bitmap, const-edition.
- Returns
- The target bitmap.
334 return d->getTarget();
◆ getTargetMutable()
| Bitmap & geometrize::task::ImageTask::getTargetMutable |
( |
| ) |
|
getTarget Gets the target bitmap, non-const edition.
- Returns
- The target bitmap.
324 return d->getTarget();
◆ getTaskId()
| std::size_t geometrize::task::ImageTask::getTaskId |
( |
| ) |
const |
getTaskId Gets the unique id of the image task.
- Returns
- The unique id of the image task.
359 return d->getTaskId();
◆ getWidth()
| std::uint32_t geometrize::task::ImageTask::getWidth |
( |
| ) |
const |
getWidth Gets the width of the images used by the image task.
- Returns
- The width of the images used by the image task.
344 return d->getWidth();
◆ isStepping()
| bool geometrize::task::ImageTask::isStepping |
( |
| ) |
const |
isStepping Returns true if the internal model is currently stepping.
- Returns
- True if the internal model is currently stepping, else false.
364 return d->isStepping();
◆ modelDidStep()
| void geometrize::task::ImageTask::modelDidStep |
( |
std::vector< geometrize::ShapeResult > |
shapes | ) |
|
|
private |
389 d->modelDidStep(shapes);
◆ modelWillStep()
| void geometrize::task::ImageTask::modelWillStep |
( |
| ) |
|
|
private |
◆ operator=()
◆ setPreferences()
setPreferences Sets the preferences for this task.
- Parameters
-
| preferences | The preferences to set. |
399 d->setPreferences(preferences);
◆ signal_drawShape
| void geometrize::task::ImageTask::signal_drawShape |
( |
std::shared_ptr< geometrize::Shape > |
shape, |
|
|
geometrize::rgba |
color |
|
) |
| |
|
signal |
signal_drawShape Signal that the image task emits to draw a shape to the internal model.
- Parameters
-
| shape | The shape to draw. |
| color | The color of the shape to draw. |
◆ signal_modelDidStep
| void geometrize::task::ImageTask::signal_modelDidStep |
( |
std::vector< geometrize::ShapeResult > |
shapes | ) |
|
|
signal |
signal_modelDidStep Signal that is emitted immediately after the underlying image task model is stepped.
- Parameters
-
| shapes | The shapes that were added in the last step. |
◆ signal_modelWillStep
| void geometrize::task::ImageTask::signal_modelWillStep |
( |
| ) |
|
|
signal |
signal_modelWillStep Signal that is emitted immediately before the underlying image task model is stepped.
◆ signal_preferencesSet
| void geometrize::task::ImageTask::signal_preferencesSet |
( |
| ) |
|
|
signal |
signal_preferencesSet Signal that is emitted immediately after the image task preferences are set.
◆ signal_step
| void geometrize::task::ImageTask::signal_step |
( |
geometrize::ImageRunnerOptions |
options, |
|
|
std::function< std::shared_ptr< geometrize::Shape >()> |
shapeCreator, |
|
|
geometrize::core::EnergyFunction |
energyFunction, |
|
|
geometrize::ShapeAcceptancePreconditionFunction |
addShapePrecondition |
|
) |
| |
|
signal |
signal_step Signal that the image task emits to make the internal model step.
◆ stepModel()
| void geometrize::task::ImageTask::stepModel |
( |
| ) |
|
stepModel Steps the internal model, typically adding a shape.
The documentation for this class was generated from the following files:
- /home/appveyor/projects/geometrize-docs/geometrize/geometrize/task/imagetask.h
- /home/appveyor/projects/geometrize-docs/geometrize/geometrize/task/imagetask.cpp