TuttleOFX
1
|
00001 #ifndef _TUTTLE_PLUGIN_INVERTPROCESS_HPP_ 00002 #define _TUTTLE_PLUGIN_INVERTPROCESS_HPP_ 00003 00004 #include "InvertPlugin.hpp" 00005 00006 #include <tuttle/plugin/global.hpp> 00007 #include <tuttle/plugin/ImageGilFilterProcessor.hpp> 00008 #include <tuttle/plugin/exceptions.hpp> 00009 00010 #include <ofxsImageEffect.h> 00011 #include <ofxsMultiThread.h> 00012 #include <boost/gil/gil_all.hpp> 00013 #include <boost/scoped_ptr.hpp> 00014 00015 namespace tuttle { 00016 namespace plugin { 00017 namespace invert { 00018 00019 template<class View> 00020 class InvertProcess : public ImageGilFilterProcessor<View> 00021 { 00022 protected: 00023 InvertPlugin& _plugin; ///< Rendering plugin 00024 InvertProcessParams _params; ///< parameters 00025 00026 template< typename WorkView > 00027 void invertRGBAPixels( WorkView& src, WorkView& dst, bool red, bool green, bool blue, bool alpha ); 00028 00029 template< typename WorkView > 00030 void invertRGBPixels( WorkView& src, WorkView& dst, bool red, bool green, bool blue ); 00031 00032 template< typename WorkView > 00033 void invertGrayPixels( WorkView& src, WorkView& dst, bool alpha ); 00034 public: 00035 InvertProcess( InvertPlugin& instance ); 00036 00037 void setup( const OFX::RenderArguments& args ); 00038 00039 void preProcess(); 00040 00041 void multiThreadProcessImages( const OfxRectI& procWindowRoW ); 00042 }; 00043 00044 } 00045 } 00046 } 00047 00048 #include "InvertProcess.tcc" 00049 00050 #endif