A filter context is the central class to create queues, images and filters. A real-world implementation would initialize a library or a framework such as CUDA or OpenCL.
namespace FilterContextClasses
{
MAXON_DECLARATION(maxon::FilterContextClasses::EntryType, EXAMPLECONTEXT,
"net.maxonexample.render_filter.context.example");
}
#define MAXON_DECLARATION(T, Name, id,...)
Definition: module.h:847
class FilterContextImpl :
public maxon::Component<FilterContextImpl, maxon::FilterContextInterface>
{
public:
};
{
}
{
return filter;
}
{
maxon::FilterImageRef image = maxon::FilterImageClasses::EXAMPLEIMAGE().Create()
iferr_return;
FilterImageImpl* imageImpl = FilterImageImpl::GetOrNull(image);
return image;
}
{
}
maxon::Result<void> FilterContextImpl::ExecuteCommandQueue(maxon::FilterCommandQueueRef commandQueue)
{
}
Definition: objectbase.h:2651
Definition: apibaseid.h:54
const Id & Get() const
Definition: apibaseid.h:185
Definition: optional.h:552
PyObject PyObject * dict
Definition: abstract.h:150
uint32_t UInt32
32 bit unsigned integer datatype.
Definition: apibase.h:177
return OK
Definition: apibase.h:2667
#define CheckState(condition,...)
Definition: errorbase.h:510
#define MAXON_SOURCE_LOCATION
Definition: memoryallocationbase.h:67
#define MAXON_COMPONENT(KIND,...)
Definition: objectbase.h:2212
#define MAXON_COMPONENT_CLASS_REGISTER(C,...)
Definition: objectbase.h:2409
#define MAXON_METHOD
Definition: interfacebase.h:1001
const Class< R > & Get(const Id &cls)
Definition: objectbase.h:2073
unsigned long Py_ssize_t width
Definition: pycore_traceback.h:88
#define iferr_scope
Definition: resultbase.h:1374
#define iferr_return
Definition: resultbase.h:1465
A filter image stores the given image data. Internally it might represent a data structure related to the underlying library or framework.
class FilterImageImpl :
public maxon::Component<FilterImageImpl, maxon::FilterImageInterface>
{
public:
private:
};
{
return buffer.CopyFrom(_imgData);
}
{
return _imgData.CopyFrom(data);
}
{
}
{
return _imgData.Resize(
width * height);
}
{
return _imgData;
}
{
return _imgData;
}
const char ** buffer
Definition: abstract.h:327
Definition: basearray.h:412
class FilterComponentRoot : public maxon::ComponentRoot
{
public:
protected:
};
{
FilterImageImpl* inputImpl = FilterImageImpl::GetOrNull(input);
FilterImageImpl* outputImpl = FilterImageImpl::GetOrNull(
output);
}
{
public:
private:
};
{
public:
private:
};
{
{
case ID_CASE(maxonexample::FilterExampleParameter::EVERYPIXEL):
{
break;
}
}
}
{
}
{
{
const maxon::Bool skip = _everyPixel ==
false &&
i % 2 == 0;
}
}
{
{
case ID_CASE(maxonexample::FilterExampleParameter::EXPONENT):
{
break;
}
}
}
{
}
{
{
{
}
}
}
#define Set(a0, a1, a2, a3, a4, a5)
Definition: Python-ast.h:586
Py_ssize_t i
Definition: abstract.h:645
MAXON_ATTRIBUTE_FORCE_INLINE Int GetCount() const
Definition: basearray.h:573
Definition: datatypebase.h:1199
ByValueParam< T >::type GetOrNull() const
Definition: datatypebase.h:1419
Definition: datatypelib.h:27
Py_UNICODE c
Definition: unicodeobject.h:1200
Py_ssize_t char * output
Definition: unicodeobject.h:985
#define ID_SWITCH(key)
Definition: fid.h:341
#define ID_CASE(key)
Definition: fid.h:354
bool Bool
boolean type, possible values are only false/true, 8 bit
Definition: apibase.h:181
float Float32
32 bit floating point value (float)
Definition: apibase.h:182
MAXON_ATTRIBUTE_FORCE_INLINE Float32 Pow(Float32 v1, Float32 v2)
Calculates v1^v2.
Definition: apibasemath.h:290
Vec4< Float32, 1 > Vector4d32
Definition: vector4d.h:28
Bool(*)(void *userPtr, Float progress) FilterProgressMonitorFunction
Definition: filter.h:10
A vector consisting of four components X, Y, Z and W.
Definition: vec4.h:21
maxon::FilterContextRef filterContext = maxon::FilterContextClasses::EXAMPLECONTEXT().Create()
iferr_return;
maxon::FilterRef filterInvert = filterContext.CreateFilter(maxon::FilterClasses::EXAMPLEINVERT.GetId())
iferr_return;
maxon::FilterRef filterPower = filterContext.CreateFilter(maxon::FilterClasses::EXAMPLEPOWER.GetId())
iferr_return;
maxon::DataDictionary imgDesc;
maxon::FilterImageRef input = filterContext.CreateImage(imgDesc)
iferr_return;