TuttleOFX
1
|
00001 #ifndef _TUTTLE_PLUGIN_COLORGRADIENT_PROCESS_HPP_ 00002 #define _TUTTLE_PLUGIN_COLORGRADIENT_PROCESS_HPP_ 00003 00004 #include "ColorGradientAlgorithm.hpp" 00005 00006 #include <tuttle/plugin/ImageGilProcessor.hpp> 00007 #include <terry/globals.hpp> 00008 #include <tuttle/plugin/exceptions.hpp> 00009 00010 #include <ofxsImageEffect.h> 00011 #include <ofxsMultiThread.h> 00012 00013 #include <boost/scoped_ptr.hpp> 00014 00015 namespace tuttle { 00016 namespace plugin { 00017 namespace colorGradient { 00018 00019 /** 00020 * @brief ColorGradient process 00021 */ 00022 template<class View, template<typename> class ColorGradientFunctor> 00023 class ColorGradientProcess : public ImageGilProcessor<View> 00024 { 00025 public: 00026 typedef typename View::value_type Pixel; 00027 typedef ColorGradientFunctor<Pixel> ColorGradientFunctorT; 00028 typedef typename ColorGradientFunctorT::point_t Point; 00029 typedef boost::gil::virtual_2d_locator<ColorGradientFunctorT, false> Locator; 00030 typedef boost::gil::image_view<Locator> ColorGradientVirtualView; 00031 00032 protected: 00033 ColorGradientPlugin& _plugin; ///< Rendering plugin 00034 ColorGradientVirtualView _srcView; ///< Source view 00035 00036 public: 00037 ColorGradientProcess( ColorGradientPlugin& instance ); 00038 00039 void setup( const OFX::RenderArguments& args ); 00040 00041 // Do some processing 00042 void multiThreadProcessImages( const OfxRectI& procWindowRoW ); 00043 }; 00044 00045 } 00046 } 00047 } 00048 00049 #include "ColorGradientProcess.tcc" 00050 00051 #endif