API Documentation
Loading...
Searching...
No Matches
ImageVectorizationEngine.h
Go to the documentation of this file.
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/String.h>
4#include <NDEVR/RGBColor.h>
5#include <NDEVR/Polygon.h>
6#include <NDEVR/TranslatedString.h>
7#include <functional>
8namespace NDEVR
9{
10 class ProgressInfo;
11
12 /**--------------------------------------------------------------------------------------------------
13 \brief Arguments used for creating vectorizations of an image
14 **/
16 {
19 std::function<void(RGBColor color, Buffer<Polygon<fltp08>> polgon_add)> add_polygon;
20 std::function<void(bool)> finished_callback;
21 };
22
23 /**--------------------------------------------------------------------------------------------------
24 \brief Contains services that can turn a 2D rastered image into linework
25 **/
27 {
28 protected:
29 explicit ImageVectorizationEngine(const TranslatedString& name, const String& id);
30 public:
33 virtual bool vectorize(VectorizeImageParams&) = 0;
34 [[nodiscard]] const TranslatedString& name() const { return m_name; }
35 [[nodiscard]] const String& id() const { return m_id; }
36 protected:
39 protected:
41 };
42}
#define NDEVR_DESIGN_API
Definition DLLInfo.h:55
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
A hash-based key-value store, useful for quick associative lookups. Key features include:
Definition Dictionary.h:61
Contains services that can turn a 2D rastered image into linework.
Definition ImageVectorizationEngine.h:27
static const Dictionary< String, ImageVectorizationEngine * > & AvailableVectorizors()
String m_id
Definition ImageVectorizationEngine.h:38
const String & id() const
Definition ImageVectorizationEngine.h:35
static void AddAvailableEngine(ImageVectorizationEngine *filter)
ImageVectorizationEngine(const TranslatedString &name, const String &id)
static Dictionary< String, ImageVectorizationEngine * > s_global_engines
Definition ImageVectorizationEngine.h:40
TranslatedString m_name
Definition ImageVectorizationEngine.h:37
virtual bool vectorize(VectorizeImageParams &)=0
const TranslatedString & name() const
Definition ImageVectorizationEngine.h:34
An N-sided polygon.
Definition Polygon.hpp:53
A light-weight base class for Log that allows processes to update, without the need for additional in...
Definition ProgressInfo.hpp:48
Represents a color in the RGB space with optional alpha transparency.
Definition RGBColor.h:54
The core String class for the NDEVR API.
Definition String.h:69
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
Definition TranslatedString.h:13
Definition ACIColor.h:37
Arguments used for creating vectorizations of an image.
Definition ImageVectorizationEngine.h:16
ProgressInfo * log
Definition ImageVectorizationEngine.h:18
std::function< void(bool)> finished_callback
Definition ImageVectorizationEngine.h:20
std::function< void(RGBColor color, Buffer< Polygon< fltp08 > > polgon_add)> add_polygon
Definition ImageVectorizationEngine.h:19
String input_image
Definition ImageVectorizationEngine.h:17