HDK
|
#include <BRAY_ImageFilter.h>
Classes | |
class | Factory |
Public Types | |
using | FactoryPtr = UT_UniquePtr< Factory > |
Public Member Functions | |
BRAY_ImageFilter (const UT_Options *o) | |
~BRAY_ImageFilter () override | |
virtual bool | isInteractive () const =0 |
virtual bool | isPerBucket () const |
virtual bool | processImage (const UT_Array< BRAY_Raster * > &write, const UT_Array< const BRAY_Raster * > &read)=0 |
virtual bool | processBucket (const UT_Array< BRAY_Raster * > &write, const UT_Array< const BRAY_Raster * > &read, const UT_DimRect &bucket) |
virtual BRAY_PixelOraclePtr | pixelOracle () |
virtual bool | update (const UT_Options &options) |
![]() | |
BRAY_FilterBase (const UT_Options *o) | |
virtual | ~BRAY_FilterBase () |
virtual const char * | className () const =0 |
Return an identifier for this plugin. More... | |
void | initialize (BRAY_FilterInit &init, const UT_StringArray &all_aovs) |
SYS_HashType | optionsHash () const |
Hash of the options passed to the constructor. More... | |
virtual bool | getAOVs (BRAY_FilterInit &init, const UT_StringArray &available, UT_StringArray &write, UT_StringArray &read)=0 |
virtual const UT_StringHolder & | errorMessage () const |
UT_StringHolder | makeError (const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2 |
Convenience method to add an error using printf style formatting. More... | |
const UT_StringArray & | writePlanes () const |
const UT_StringArray & | readPlanes () const |
Static Public Member Functions | |
static void | listFactories (UT_StringArray &result) |
static void | registerPlugin (const UT_StringHolder &name, FactoryPtr factory) |
static UT_UniquePtr < BRAY_ImageFilter > | instancePlugin (const UT_StringRef &style, const UT_Options *options=nullptr) |
static void | releasePlugin (UT_UniquePtr< BRAY_ImageFilter > p) |
static void | freePluginCache () |
Protected Member Functions | |
int | addAOV (BRAY_FilterInit &init, const UT_StringHolder &name, const UT_StringHolder &var, int tuple_size, const BRAY::OptionSet &options) |
BRAY::OptionSet | planeProperties (BRAY_FilterInit &init) const |
Create an option set before adding creating an extra AOV. More... | |
Image filter plugins are run after pixel filtering, but before the rasters are written to the display device.
Definition at line 30 of file BRAY_ImageFilter.h.
Definition at line 42 of file BRAY_ImageFilter.h.
|
inline |
Definition at line 58 of file BRAY_ImageFilter.h.
|
override |
|
protected |
If the filter needs an additional AOV, you can call this method during getAOVs(). The function returns the index of the new AOV (or -1 on failure). If there are errors, the messages will be printed out to UT_ErrorLog.
If options are required, they can be initialized by planeProperties() Passing in an empty OptionSet is legal.
|
static |
Access to factory
|
static |
Access to factory
|
pure virtual |
Return whether the filter can be run interactively (for intermediate IPR updates for example). If this method returns false, when rendering interactively, the filter will only be run when the rendering has completed. If the method returns true, the filter may be run 100s or 1000s of times during an interactive render.
When rendering non-interactively, image filters are run at the end of the render.
|
inlinevirtual |
If the filter does not need to read or write to neighbouring pixels, then allow it to run per-bucket. When this is true, processBucket() is invoked instead of processImage(), and it is invoked each time a bucket is finished (by its own worker thread).
Definition at line 87 of file BRAY_ImageFilter.h.
|
static |
Access to factory
|
inlinevirtual |
An image filter can, optionally, provide a pixel oracle to help steer rendering. The filter should provide an option to the user to disable creation of this oracle. It should also be able to run without the oracle. The default method returns a nullptr.
This method is called after initialize()
is called on the image filter.
Definition at line 114 of file BRAY_ImageFilter.h.
|
protected |
Create an option set before adding creating an extra AOV.
|
inlinevirtual |
Process the rasters (per-bucket version). Note that per-bucket image filters are processed before whole-image filters.
Definition at line 102 of file BRAY_ImageFilter.h.
|
pure virtual |
Process the rasters. The plugin should write to the write
rasters passed in, using the read
rasters as source data. The order of the rasters in the arrays matches the order in writePlanes()
and readPlanes()
. So, it follows the size of the arrays should match the size of the writePlanes()
and readPlanes
.
This order is immutable after initialization is called.
|
static |
Access to factory
|
static |
Access to factory
|
inlinevirtual |
Updates the image filter for the given options. If supported an image filter can update itself by calling update method with new parameters. This avoids the need to recreate the filter everytime an option changes.
Returns true on success or false if fails to update.
Definition at line 123 of file BRAY_ImageFilter.h.