TuttleOFX  1
BasicKeyerPlugin.hpp
Go to the documentation of this file.
00001 #ifndef _TUTTLE_PLUGIN_BASICKEYER_PLUGIN_HPP_
00002 #define _TUTTLE_PLUGIN_BASICKEYER_PLUGIN_HPP_
00003 
00004 #include "BasicKeyerDefinitions.hpp"
00005 
00006 #include <tuttle/plugin/ImageEffectGilPlugin.hpp>
00007 
00008 namespace tuttle {
00009 namespace plugin {
00010 namespace basicKeyer {
00011 
00012 template<class View>
00013 struct BasicKeyerProcessParams
00014 {
00015         typedef typename View::value_type Pixel;
00016         typedef boost::gil::point2<double> Point2;
00017         Point2 _cornerA;
00018         Point2 _cornerB;
00019         std::vector<Point2> _points;
00020         std::vector<boost::gil::rgba32f_pixel_t> _colors;
00021 };
00022 
00023 /**
00024  * @brief BasicKeyer plugin
00025  */
00026 class BasicKeyerPlugin : public ImageEffectGilPlugin
00027 {
00028 public:
00029         typedef boost::gil::point2<double> Point2;
00030 
00031 public:
00032         BasicKeyerPlugin( OfxImageEffectHandle handle );
00033 
00034 public:
00035         void render( const OFX::RenderArguments& args );
00036         void changedParam( const OFX::InstanceChangedArgs& args, const std::string& paramName );
00037 
00038         template<class View>
00039         BasicKeyerProcessParams<View> getProcessParams() const;
00040 
00041 public:
00042         typedef std::vector<OFX::Double2DParam*> Double2DParamVector;
00043         typedef std::vector<OFX::RGBAParam*> RGBAParamVector;
00044 
00045         Double2DParamVector _paramPoints;
00046         RGBAParamVector _paramColors;
00047         OFX::ChoiceParam* _paramMode;
00048         OFX::IntParam* _paramNbPoints;
00049 
00050 private:
00051         OFX::InstanceChangedArgs _instanceChangedArgs;
00052 };
00053 
00054 }
00055 }
00056 }
00057 
00058 #endif