TuttleOFX
1
|
Convolution plugin. More...
#include <ConvolutionPlugin.hpp>
Public Member Functions | |
ConvolutionPlugin (OfxImageEffectHandle handle) | |
void | render (const OFX::RenderArguments &args) |
The overridden render function. | |
bool | isIdentity (const OFX::RenderArguments &args, OFX::Clip *&identityClip, double &identityTime) |
client is identity function, returns the clip and time for the identity function | |
void | getRegionsOfInterest (const OFX::RegionsOfInterestArguments &args, OFX::RegionOfInterestSetter &rois) |
the get region of interest action | |
bool | getRegionOfDefinition (const OFX::RegionOfDefinitionArguments &args, OfxRectD &rod) |
The get RoD action. | |
void | changedParam (const OFX::InstanceChangedArgs &args, const std::string ¶mName) |
called when a param has just had its value changed | |
ConvolutionProcessParams | getProcessParams () const |
Data Fields | |
OFX::Int2DParam * | _paramSize |
OFX::ChoiceParam * | _paramBorder |
std::vector< std::vector < OFX::DoubleParam * > > | _paramCoef |
Convolution plugin.
Definition at line 36 of file ConvolutionPlugin.hpp.
tuttle::plugin::convolution::ConvolutionPlugin::ConvolutionPlugin | ( | OfxImageEffectHandle | handle | ) |
Definition at line 13 of file ConvolutionPlugin.cpp.
References _paramBorder, _paramCoef, _paramSize, OFX::ParamSet::fetchChoiceParam(), OFX::ParamSet::fetchDoubleParam(), OFX::ParamSet::fetchInt2DParam(), tuttle::plugin::convolution::getCoefName(), tuttle::plugin::convolution::kParamBorder, tuttle::plugin::convolution::kParamSize, and tuttle::plugin::convolution::kParamSizeMax.
void tuttle::plugin::convolution::ConvolutionPlugin::changedParam | ( | const OFX::InstanceChangedArgs & | args, |
const std::string & | paramName | ||
) | [virtual] |
called when a param has just had its value changed
Reimplemented from OFX::ImageEffect.
Definition at line 138 of file ConvolutionPlugin.cpp.
References _paramCoef, _paramSize, OFX::eChangeUserEdit, OFX::Int2DParam::getValue(), tuttle::plugin::convolution::kParamSize, tuttle::plugin::convolution::kParamSizeMax, OFX::InstanceChangedArgs::reason, OFX::Int2DParam::setValue(), OfxPointI::x, and OfxPointI::y.
ConvolutionProcessParams tuttle::plugin::convolution::ConvolutionPlugin::getProcessParams | ( | ) | const |
Definition at line 30 of file ConvolutionPlugin.cpp.
References _paramBorder, _paramCoef, _paramSize, terry::filter::convolve_option_extend_constant, terry::filter::convolve_option_extend_mirror, terry::filter::convolve_option_extend_padded, terry::filter::convolve_option_extend_zero, tuttle::plugin::convolution::eParamBorderBlack, tuttle::plugin::convolution::eParamBorderConstant, tuttle::plugin::convolution::eParamBorderMirror, tuttle::plugin::convolution::eParamBorderPadded, OFX::Int2DParam::getValue(), and OFX::ChoiceParam::getValue().
Referenced by getRegionOfDefinition().
bool tuttle::plugin::convolution::ConvolutionPlugin::getRegionOfDefinition | ( | const OFX::RegionOfDefinitionArguments & | args, |
OfxRectD & | rod | ||
) | [virtual] |
The get RoD action.
If the effect wants change the rod from the default value (which is the union of RoD's of all input clips) it should set the rod argument and return true.
This is all in cannonical coordinates.
Reimplemented from OFX::ImageEffect.
Definition at line 93 of file ConvolutionPlugin.cpp.
References tuttle::plugin::convolution::ConvolutionProcessParams::_border, tuttle::plugin::ImageEffectGilPlugin::_clipSrc, tuttle::plugin::convolution::ConvolutionProcessParams::_convX, tuttle::plugin::convolution::ConvolutionProcessParams::_convY, tuttle::plugin::convolution::eParamBorderPadded, OFX::Clip::getCanonicalRod(), getProcessParams(), OFX::RegionOfDefinitionArguments::time, OfxRectD::x1, OfxRectD::x2, OfxRectD::y1, and OfxRectD::y2.
void tuttle::plugin::convolution::ConvolutionPlugin::getRegionsOfInterest | ( | const OFX::RegionsOfInterestArguments & | args, |
OFX::RegionOfInterestSetter & | rois | ||
) | [virtual] |
the get region of interest action
the get RoI action
If the effect wants change its region of interest on any input clip from the default values (which is the same as the RoI in the arguments) it should do so by calling the OFX::RegionOfInterestSetter::setRegionOfInterest function on the rois argument.
Note, everything is in cannonical coordinates.
Reimplemented from OFX::ImageEffect.
Definition at line 112 of file ConvolutionPlugin.cpp.
References tuttle::plugin::ImageEffectGilPlugin::_clipSrc, _paramSize, OFX::Int2DParam::getValue(), OFX::RegionsOfInterestArguments::regionOfInterest, OFX::RegionOfInterestSetter::setRegionOfInterest(), OfxPointI::x, OfxPointD::x, OfxRectD::x1, OfxRectD::x2, OfxPointI::y, OfxPointD::y, OfxRectD::y1, and OfxRectD::y2.
bool tuttle::plugin::convolution::ConvolutionPlugin::isIdentity | ( | const OFX::RenderArguments & | args, |
OFX::Clip *& | identityClip, | ||
double & | identityTime | ||
) | [virtual] |
client is identity function, returns the clip and time for the identity function
If the effect would do no processing for the given param set and render arguments, then this function should return true and set the identityClip pointer to point to the clip that is the identity and identityTime to be the time at which to access the clip for the identity operation.
Reimplemented from OFX::ImageEffect.
Definition at line 127 of file ConvolutionPlugin.cpp.
References tuttle::plugin::ImageEffectGilPlugin::_clipSrc, _paramSize, OFX::Int2DParam::getValue(), OFX::RenderArguments::time, OfxPointI::x, and OfxPointI::y.
void tuttle::plugin::convolution::ConvolutionPlugin::render | ( | const OFX::RenderArguments & | args | ) | [virtual] |
The overridden render function.
[in] | args | Rendering parameters |
Implements OFX::ImageEffect.
Definition at line 88 of file ConvolutionPlugin.cpp.
Definition at line 54 of file ConvolutionPlugin.hpp.
Referenced by ConvolutionPlugin(), and getProcessParams().
std::vector<std::vector<OFX::DoubleParam*> > tuttle::plugin::convolution::ConvolutionPlugin::_paramCoef |
Definition at line 55 of file ConvolutionPlugin.hpp.
Referenced by changedParam(), ConvolutionPlugin(), and getProcessParams().
Definition at line 53 of file ConvolutionPlugin.hpp.
Referenced by changedParam(), ConvolutionPlugin(), getProcessParams(), getRegionsOfInterest(), and isIdentity().