TuttleOFX  1
ColorGradationProcess.hpp
Go to the documentation of this file.
00001 #ifndef _TUTTLE_PLUGIN_COLORGRADATION_PROCESS_HPP_
00002 #define _TUTTLE_PLUGIN_COLORGRADATION_PROCESS_HPP_
00003 
00004 #include <tuttle/plugin/ImageGilFilterProcessor.hpp>
00005 #include <boost/scoped_ptr.hpp>
00006 
00007 namespace tuttle {
00008 namespace plugin {
00009 namespace colorGradation {
00010 
00011 /**
00012  * @brief ColorGradation process
00013  *
00014  */
00015 template<class View>
00016 class ColorGradationProcess : public ImageGilFilterProcessor<View>
00017 {
00018 public:
00019         typedef float Scalar;
00020 
00021 protected:
00022         ColorGradationPlugin&               _plugin;        ///< Rendering plugin
00023         ColorGradationProcessParams<Scalar> _params;
00024 
00025 public:
00026         ColorGradationProcess( ColorGradationPlugin& effect );
00027 
00028         void setup( const OFX::RenderArguments& args );
00029         void multiThreadProcessImages( const OfxRectI& procWindowRoW );
00030 
00031 private:
00032         template<class TIN, class TOUT>
00033         GIL_FORCEINLINE
00034         void processSwitchAlpha( const bool processAlpha, const View& src, const View& dst, TIN gradationIn = TIN(), TOUT gradationOut = TOUT() );
00035 
00036         template <class TIN>
00037         GIL_FORCEINLINE
00038         void processSwitchOut( const EParamGradation out, const bool processAlpha, const View& src, const View& dst, TIN gradationIn = TIN() );
00039 
00040         void processSwitchInOut( const EParamGradation in, const EParamGradation out, const bool processAlpha, const View& src, const View& dst );
00041 };
00042 
00043 }
00044 }
00045 }
00046 
00047 #include "ColorGradationProcess.tcc"
00048 
00049 #endif
00050