#include "SqrtAlgorithm.h"
#include <ImFusion/Base/MemImage.h>
: m_image(image)
{
configureDefaults();
}
SqrtAlgorithm::~SqrtAlgorithm() {}
{
if (data.size() == 1)
{
if (!img)
if (img)
{
if (a)
*a = new SqrtAlgorithm(img);
return true;
}
}
return false;
}
void SqrtAlgorithm::compute()
{
if (!m_image)
return;
for (
int z = 0; z < mem->
slices(); ++z)
{
for (
int y = 0; y < mem->
height(); ++y)
{
for (
int x = 0; x < mem->
width(); ++x)
{
}
}
}
m_image->get()->setDirtyMem();
}
void SqrtAlgorithm::configure(
const Properties* p)
{
if (!p)
return;
p->
param(
"multiplier", m_multiplier);
}
void SqrtAlgorithm::configuration(
Properties* p)
const
{
if (!p)
return;
p->
setParam(
"multiplier", m_multiplier, 2.0);
}
Interface for describing algorithms that can be made available in the ImFusion Suite through Algorith...
Definition Algorithm.h:41
@ VOLUME
3D volume
Definition Data.h:35
@ IMAGE
2D image
Definition Data.h:34
Container for any number of Data instances such as image or meshes.
Definition DataList.h:30
int width() const
Returns the width of the image.
Definition Image.h:109
int slices() const
Returns the number of 3D slices of the image.
Definition Image.h:115
int height() const
Returns the height of the image.
Definition Image.h:112
Abstract base class for an image residing in main memory.
Definition MemImage.h:20
virtual void setValueDouble(double value, size_t index) const =0
Set the pixel intensity at the given index to value casted to the underlying type without any clampin...
virtual double valueDouble(size_t index) const =0
Return the pixel intensity at the given index without interpolation casted to double.
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:425
bool param(const std::string &name, T &value) const
Return the value of a parameter of arbitrary types.
Definition Properties.h:437
Set of images independent of their storage location.
Definition SharedImageSet.h:42
Namespace of the ImFusion SDK.
Definition Changelog.dox:1