#include "ExampleAlgorithm.h"
: m_image(image)
, m_output(nullptr)
{
configureDefaults();
}
ExampleAlgorithm::~ExampleAlgorithm() = default;
{
if (data.size() == 1)
{
{
if (img)
{
if (a)
*a = new ExampleAlgorithm(img);
return true;
}
}
}
return false;
}
void ExampleAlgorithm::compute()
{
}
{
result.
add(std::move(m_output));
return result;
}
void ExampleAlgorithm::configure(
const Properties* p)
{
if (!p)
return;
p->
param(
"paramVec", m_paramVec);
p->
param(
"firstParameter", m_paramDouble);
}
void ExampleAlgorithm::configuration(
Properties* p)
const
{
if (!p)
return;
p->
setParam(
"firstParameter", m_paramDouble);
p->
setParam(
"paramVec", m_paramVec, vec2(1, 0));
}
Interface for describing algorithms that can be made available in the ImFusion Suite through Algorith...
Definition Algorithm.h:41
virtual void configure(const Properties *p)
Configure this object instance by de-serializing the given Properties.
virtual void configuration(Properties *p) const
Serialize the current object configuration into the given Properties object.
@ IMAGE
2D image
Definition Data.h:34
Container for any number of Data instances such as image or meshes.
Definition DataList.h:30
Wrapper class to store a list of owned Data instances.
Definition OwningDataList.h:24
virtual void add(std::unique_ptr< Data > data)
Add data to the list.
Storage container for serialization of arbitrary types, internally backed by strings.
Definition Properties.h:50
void setParam(const std::string &name, const T &value, const T &defaultValue)
Set a parameter with arbitrary type and a default value.
Definition Properties.h:424
bool param(const std::string &name, T &value) const
Return the value of a parameter of arbitrary types.
Definition Properties.h:436
Set of images independent of their storage location.
Definition SharedImageSet.h:42
Namespace of the ImFusion SDK.
Definition Assert.h:7