TuttleOFX
1
|
00001 #ifndef _TUTTLE_PLUGIN_PUSHPIXEL_PROCESS_HPP_ 00002 #define _TUTTLE_PLUGIN_PUSHPIXEL_PROCESS_HPP_ 00003 00004 #include <tuttle/plugin/ImageGilFilterProcessor.hpp> 00005 #include <boost/scoped_ptr.hpp> 00006 00007 namespace tuttle { 00008 namespace plugin { 00009 namespace pushPixel { 00010 00011 /** 00012 * @brief PushPixel process 00013 * 00014 */ 00015 template<class View> 00016 class PushPixelProcess : public ImageGilFilterProcessor<View> 00017 { 00018 public: 00019 typedef float Scalar; 00020 typedef typename View::value_type Pixel; 00021 typedef typename terry::image_from_view<View>::type Image; 00022 typedef typename View::point_t Point; 00023 protected : 00024 PushPixelPlugin& _plugin; ///< Rendering plugin 00025 00026 PushPixelProcessParams<Scalar> _params; 00027 00028 OFX::Clip* _clipMask; ///< Source image clip 00029 bool _clipMaskConnected; 00030 boost::scoped_ptr<OFX::Image> _mask; 00031 OfxRectI _maskPixelRod; 00032 View _maskView; 00033 00034 public: 00035 PushPixelProcess( PushPixelPlugin& effect ); 00036 00037 void preProcess() { this->progressBegin( (this->_renderArgs.renderWindow.y2 - this->_renderArgs.renderWindow.y1) * (this->_renderArgs.renderWindow.x2 - this->_renderArgs.renderWindow.x1) * 4 ); } 00038 00039 void setup( const OFX::RenderArguments& args ); 00040 00041 void multiThreadProcessImages( const OfxRectI& procWindowRoW ); 00042 }; 00043 00044 } 00045 } 00046 } 00047 00048 #include "PushPixelProcess.tcc" 00049 00050 #endif