TuttleOFX
1
|
00001 #include "FloodFillPlugin.hpp" 00002 #include "FloodFillProcess.hpp" 00003 #include "FloodFillDefinitions.hpp" 00004 00005 #include <boost/gil/gil_all.hpp> 00006 00007 namespace tuttle { 00008 namespace plugin { 00009 namespace floodFill { 00010 00011 00012 FloodFillPlugin::FloodFillPlugin( OfxImageEffectHandle handle ) 00013 : ImageEffectGilPlugin( handle ) 00014 { 00015 _paramUpperThres = fetchDoubleParam( kParamUpperThres ); 00016 _paramLowerThres = fetchDoubleParam( kParamLowerThres ); 00017 _paramRelativeMinMax = fetchBooleanParam( kParamMinMaxRelative ); 00018 _paramMethod = fetchChoiceParam( kParamMethod ); 00019 } 00020 00021 FloodFillProcessParams<FloodFillPlugin::Scalar> FloodFillPlugin::getProcessParams( const OfxPointD& renderScale ) const 00022 { 00023 FloodFillProcessParams<Scalar> params; 00024 00025 params._upperThres = _paramUpperThres->getValue(); 00026 params._lowerThres = _paramLowerThres->getValue(); 00027 params._relativeMinMax = _paramRelativeMinMax->getValue(); 00028 params._method = static_cast<EParamMethod>( _paramMethod->getValue() ); 00029 00030 return params; 00031 } 00032 00033 void FloodFillPlugin::changedParam( const OFX::InstanceChangedArgs &args, const std::string ¶mName ) 00034 { 00035 } 00036 00037 /** 00038 * @brief The overridden render function 00039 * @param[in] args Rendering parameters 00040 */ 00041 void FloodFillPlugin::render( const OFX::RenderArguments& args ) 00042 { 00043 doGilRender<FloodFillProcess>( *this, args ); 00044 } 00045 00046 } 00047 } 00048 }