TuttleOFX
1
|
Sobel plugin. More...
#include <SobelPlugin.hpp>
Sobel plugin.
Definition at line 41 of file SobelPlugin.hpp.
typedef float tuttle::plugin::sobel::SobelPlugin::Scalar |
Definition at line 44 of file SobelPlugin.hpp.
tuttle::plugin::sobel::SobelPlugin::SobelPlugin | ( | OfxImageEffectHandle | handle | ) |
Definition at line 209 of file SobelPlugin.cpp.
References _paramBorder, _paramComputeGradientDirection, _paramComputeGradientNorm, _paramGradientDirectionAbs, _paramGradientNormManhattan, _paramKernelEpsilon, _paramNormalizedKernel, _paramOutputComponent, _paramPass, _paramReverseKernel, _paramSize, _paramUnidimensional, OFX::ParamSet::fetchBooleanParam(), OFX::ParamSet::fetchChoiceParam(), OFX::ParamSet::fetchDouble2DParam(), OFX::ParamSet::fetchDoubleParam(), tuttle::plugin::sobel::kParamBorder, tuttle::plugin::sobel::kParamComputeGradientDirection, tuttle::plugin::sobel::kParamComputeGradientNorm, tuttle::plugin::sobel::kParamGradientDirectionAbs, tuttle::plugin::sobel::kParamGradientNormManhattan, tuttle::plugin::sobel::kParamKernelEpsilon, tuttle::plugin::sobel::kParamNormalizedKernel, tuttle::plugin::sobel::kParamOutputComponent, tuttle::plugin::sobel::kParamPass, tuttle::plugin::sobel::kParamReverseKernel, tuttle::plugin::sobel::kParamSize, and tuttle::plugin::sobel::kParamUnidimensional.
void tuttle::plugin::sobel::SobelPlugin::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 298 of file SobelPlugin.cpp.
References tuttle::plugin::sobel::SobelProcessParams< Scalar >::_size, tuttle::plugin::sobel::SobelProcessParams< Scalar >::_xKernelGaussian, tuttle::plugin::sobel::SobelProcessParams< Scalar >::_xKernelGaussianDerivative, tuttle::plugin::sobel::SobelProcessParams< Scalar >::_yKernelGaussian, tuttle::plugin::sobel::SobelProcessParams< Scalar >::_yKernelGaussianDerivative, OFX::Message::eMessageMessage, getProcessParams(), tuttle::plugin::sobel::kParamInfos, OFX::InstanceChangedArgs::renderScale, and OFX::ImageEffect::sendMessage().
void tuttle::plugin::sobel::SobelPlugin::getClipPreferences | ( | OFX::ClipPreferencesSetter & | clipPreferences | ) | [virtual] |
get the clip preferences
Reimplemented from OFX::ImageEffect.
Definition at line 323 of file SobelPlugin.cpp.
References tuttle::plugin::ImageEffectGilPlugin::_clipDst, _paramOutputComponent, tuttle::plugin::sobel::eParamOutputComponentRGB, tuttle::plugin::sobel::eParamOutputComponentRGBA, OFX::ePixelComponentRGB, OFX::ePixelComponentRGBA, OFX::ChoiceParam::getValue(), and OFX::ClipPreferencesSetter::setClipComponents().
SobelProcessParams< SobelPlugin::Scalar > tuttle::plugin::sobel::SobelPlugin::getProcessParams | ( | const OfxPointD & | renderScale = OFX::kNoRenderScale | ) | const |
Definition at line 226 of file SobelPlugin.cpp.
References _paramBorder, _paramComputeGradientDirection, _paramComputeGradientNorm, _paramGradientDirectionAbs, _paramGradientNormManhattan, _paramKernelEpsilon, _paramNormalizedKernel, _paramPass, _paramReverseKernel, _paramSize, _paramUnidimensional, tuttle::plugin::sobel::SobelProcessParams< Scalar >::_size, 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::sobel::eParamBorderBlack, tuttle::plugin::sobel::eParamBorderConstant, tuttle::plugin::sobel::eParamBorderMirror, tuttle::plugin::sobel::eParamBorderPadded, OFX::DoubleParam::getValue(), OFX::Double2DParam::getValue(), OFX::ChoiceParam::getValue(), OFX::BooleanParam::getValue(), tuttle::plugin::ofxToGil(), and terry::filter::reverse_kernel().
Referenced by changedParam(), getRegionOfDefinition(), getRegionsOfInterest(), isIdentity(), and tuttle::plugin::sobel::SobelProcess< SView, DView >::setup().
bool tuttle::plugin::sobel::SobelPlugin::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 341 of file SobelPlugin.cpp.
References tuttle::plugin::sobel::SobelProcessParams< Scalar >::_border, tuttle::plugin::ImageEffectGilPlugin::_clipSrc, tuttle::plugin::sobel::SobelProcessParams< Scalar >::_xKernelGaussian, tuttle::plugin::sobel::SobelProcessParams< Scalar >::_xKernelGaussianDerivative, tuttle::plugin::sobel::SobelProcessParams< Scalar >::_yKernelGaussian, tuttle::plugin::sobel::SobelProcessParams< Scalar >::_yKernelGaussianDerivative, tuttle::plugin::sobel::eParamBorderPadded, OFX::Clip::getCanonicalRod(), getProcessParams(), terry::filter::detail::kernel_1d_adaptor< Core >::left_size(), tuttle::max(), terry::filter::detail::kernel_1d_adaptor< Core >::right_size(), OFX::RegionOfDefinitionArguments::time, OfxRectD::x1, OfxRectD::x2, OfxRectD::y1, and OfxRectD::y2.
void tuttle::plugin::sobel::SobelPlugin::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 361 of file SobelPlugin.cpp.
References tuttle::plugin::ImageEffectGilPlugin::_clipSrc, tuttle::plugin::sobel::SobelProcessParams< Scalar >::_pass, tuttle::plugin::sobel::SobelProcessParams< Scalar >::_xKernelGaussian, tuttle::plugin::sobel::SobelProcessParams< Scalar >::_xKernelGaussianDerivative, tuttle::plugin::sobel::SobelProcessParams< Scalar >::_yKernelGaussian, tuttle::plugin::sobel::SobelProcessParams< Scalar >::_yKernelGaussianDerivative, tuttle::plugin::sobel::eParamPass1, tuttle::plugin::sobel::eParamPass2, tuttle::plugin::sobel::eParamPassFull, OFX::Clip::getCanonicalRod(), getProcessParams(), terry::filter::detail::kernel_1d_adaptor< Core >::left_size(), tuttle::max(), terry::filter::detail::kernel_1d_adaptor< Core >::right_size(), OFX::RegionOfInterestSetter::setRegionOfInterest(), OFX::RegionsOfInterestArguments::time, OfxRectD::x1, OfxRectD::x2, OfxRectD::y1, and OfxRectD::y2.
bool tuttle::plugin::sobel::SobelPlugin::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 399 of file SobelPlugin.cpp.
References tuttle::plugin::ImageEffectGilPlugin::_clipSrc, tuttle::plugin::sobel::SobelProcessParams< Scalar >::_unidimensional, tuttle::plugin::sobel::SobelProcessParams< Scalar >::_xKernelGaussian, tuttle::plugin::sobel::SobelProcessParams< Scalar >::_xKernelGaussianDerivative, tuttle::plugin::sobel::SobelProcessParams< Scalar >::_yKernelGaussian, tuttle::plugin::sobel::SobelProcessParams< Scalar >::_yKernelGaussianDerivative, getProcessParams(), OFX::RenderArguments::renderScale, and OFX::RenderArguments::time.
void tuttle::plugin::sobel::SobelPlugin::render | ( | const OFX::RenderArguments & | args | ) | [virtual] |
The overridden render function.
[in] | args | Rendering parameters |
Implements OFX::ImageEffect.
Definition at line 416 of file SobelPlugin.cpp.
References tuttle::plugin::ImageEffectGilPlugin::_clipDst, and tuttle::plugin::ImageEffectGilPlugin::_clipSrc.
Definition at line 67 of file SobelPlugin.hpp.
Referenced by getProcessParams(), and SobelPlugin().
Definition at line 70 of file SobelPlugin.hpp.
Referenced by getProcessParams(), and SobelPlugin().
Definition at line 68 of file SobelPlugin.hpp.
Referenced by getProcessParams(), and SobelPlugin().
Definition at line 71 of file SobelPlugin.hpp.
Referenced by getProcessParams(), and SobelPlugin().
Definition at line 69 of file SobelPlugin.hpp.
Referenced by getProcessParams(), and SobelPlugin().
Definition at line 65 of file SobelPlugin.hpp.
Referenced by getProcessParams(), and SobelPlugin().
Definition at line 62 of file SobelPlugin.hpp.
Referenced by getProcessParams(), and SobelPlugin().
Definition at line 72 of file SobelPlugin.hpp.
Referenced by getClipPreferences(), and SobelPlugin().
Definition at line 64 of file SobelPlugin.hpp.
Referenced by getProcessParams(), and SobelPlugin().
Definition at line 63 of file SobelPlugin.hpp.
Referenced by getProcessParams(), and SobelPlugin().
Definition at line 61 of file SobelPlugin.hpp.
Referenced by getProcessParams(), and SobelPlugin().
Definition at line 66 of file SobelPlugin.hpp.
Referenced by getProcessParams(), and SobelPlugin().