TuttleOFX  1
ColorTransferPlugin.hpp
Go to the documentation of this file.
00001 #ifndef _TUTTLE_PLUGIN_COLORTRANSFER_PLUGIN_HPP_
00002 #define _TUTTLE_PLUGIN_COLORTRANSFER_PLUGIN_HPP_
00003 
00004 #include "ColorTransferDefinitions.hpp"
00005 
00006 #include <tuttle/plugin/ImageEffectGilPlugin.hpp>
00007 
00008 namespace tuttle {
00009 namespace plugin {
00010 namespace colorTransfer {
00011 
00012 template<typename Scalar>
00013 struct ColorTransferProcessParams
00014 {
00015         EColorspace _colorspace;
00016         Scalar      _averageCoef;
00017         Scalar      _dynamicCoef;
00018 };
00019 
00020 /**
00021  * @brief ColorTransfer plugin
00022  */
00023 class ColorTransferPlugin : public ImageEffectGilPlugin
00024 {
00025 public:
00026         typedef double Scalar;
00027 public:
00028         ColorTransferPlugin( OfxImageEffectHandle handle );
00029 
00030 public:
00031         ColorTransferProcessParams<Scalar> getProcessParams( const OfxPointD& renderScale = OFX::kNoRenderScale ) const;
00032 
00033         void changedParam( const OFX::InstanceChangedArgs &args, const std::string &paramName );
00034 
00035         void getRegionsOfInterest( const OFX::RegionsOfInterestArguments& args, OFX::RegionOfInterestSetter& rois );
00036 
00037         void render( const OFX::RenderArguments &args );
00038         
00039 public:
00040         OFX::Clip* _clipSrcRef; ///< Source reference
00041         OFX::Clip* _clipDstRef; ///< Dest reference
00042 
00043         OFX::ChoiceParam* _paramColospace;
00044         OFX::DoubleParam* _paramAverageCoef;
00045         OFX::DoubleParam* _paramDynamicCoef;
00046 
00047 };
00048 
00049 }
00050 }
00051 }
00052 
00053 #endif