TuttleOFX
1
|
00001 #ifndef _TUTTLE_PLUGIN_FLOODFILL_PLUGIN_HPP_ 00002 #define _TUTTLE_PLUGIN_FLOODFILL_PLUGIN_HPP_ 00003 00004 #include "FloodFillDefinitions.hpp" 00005 00006 #include <tuttle/plugin/ImageEffectGilPlugin.hpp> 00007 00008 namespace tuttle { 00009 namespace plugin { 00010 namespace floodFill { 00011 00012 template<typename Scalar> 00013 struct FloodFillProcessParams 00014 { 00015 Scalar _upperThres; 00016 Scalar _lowerThres; 00017 bool _relativeMinMax; 00018 EParamMethod _method; 00019 }; 00020 00021 /** 00022 * @brief FloodFill plugin 00023 */ 00024 class FloodFillPlugin : public ImageEffectGilPlugin 00025 { 00026 public: 00027 typedef float Scalar; 00028 public: 00029 FloodFillPlugin( OfxImageEffectHandle handle ); 00030 00031 public: 00032 FloodFillProcessParams<Scalar> getProcessParams( const OfxPointD& renderScale = OFX::kNoRenderScale ) const; 00033 00034 void changedParam( const OFX::InstanceChangedArgs &args, const std::string ¶mName ); 00035 00036 void render( const OFX::RenderArguments &args ); 00037 00038 00039 public: 00040 OFX::DoubleParam* _paramUpperThres; 00041 OFX::DoubleParam* _paramLowerThres; 00042 OFX::BooleanParam* _paramRelativeMinMax; 00043 OFX::ChoiceParam* _paramMethod; 00044 }; 00045 00046 } 00047 } 00048 } 00049 00050 #endif