TuttleOFX
1
|
00001 #ifndef _TUTTLE_PLUGIN_IDKEYER_PLUGIN_HPP_ 00002 #define _TUTTLE_PLUGIN_IDKEYER_PLUGIN_HPP_ 00003 00004 #include "IdKeyerDefinitions.hpp" 00005 00006 #include <tuttle/plugin/ImageEffectGilPlugin.hpp> 00007 00008 namespace tuttle { 00009 namespace plugin { 00010 namespace idKeyer { 00011 00012 template<class View> 00013 struct IdKeyerProcessParams 00014 { 00015 typedef typename boost::gil::rgba32f_pixel_t Pixel; 00016 std::vector<Pixel> _colors; 00017 double _tolerance; 00018 bool _useAlpha; 00019 }; 00020 00021 /** 00022 * @brief IdKeyer plugin 00023 */ 00024 class IdKeyerPlugin : public ImageEffectGilPlugin 00025 { 00026 public: 00027 IdKeyerPlugin( OfxImageEffectHandle handle ); 00028 00029 public: 00030 void render( const OFX::RenderArguments& args ); 00031 void changedParam( const OFX::InstanceChangedArgs& args, const std::string& paramName ); 00032 00033 template<class View> 00034 IdKeyerProcessParams<View> getProcessParams() const; 00035 00036 public: 00037 typedef std::vector<OFX::RGBAParam*> RGBAParamVector; 00038 00039 RGBAParamVector _paramColors; 00040 OFX::IntParam* _paramNbPoints; 00041 OFX::BooleanParam* _paramUseAlpha; 00042 OFX::DoubleParam* _paramTolerance; 00043 00044 private: 00045 OFX::InstanceChangedArgs _instanceChangedArgs; 00046 }; 00047 00048 } 00049 } 00050 } 00051 00052 #endif