TuttleOFX
1
|
00001 #ifndef _TUTTLE_PLUGIN_CONSTANT_PROCESS_HPP_ 00002 #define _TUTTLE_PLUGIN_CONSTANT_PROCESS_HPP_ 00003 00004 #include <terry/globals.hpp> 00005 00006 #include <tuttle/plugin/ImageGilProcessor.hpp> 00007 #include <tuttle/plugin/exceptions.hpp> 00008 00009 #include <ofxsImageEffect.h> 00010 #include <ofxsMultiThread.h> 00011 00012 #include <terry/generator/constant.hpp> 00013 00014 #include <boost/gil/gil_all.hpp> 00015 #include <boost/scoped_ptr.hpp> 00016 00017 namespace tuttle { 00018 namespace plugin { 00019 namespace constant { 00020 00021 template<class View> 00022 struct ConstantParams 00023 { 00024 typedef typename View::value_type Pixel; 00025 Pixel _color; 00026 }; 00027 00028 template<class View> 00029 class ConstantProcess : public ImageGilProcessor<View> 00030 { 00031 public: 00032 typedef typename View::value_type Pixel; 00033 typedef typename View::point_t Point; 00034 typedef typename terry::generator::ConstantColorViewFactory<Pixel>::ConstantVirtualView ConstantVirtualView; 00035 00036 protected: 00037 ConstantPlugin& _plugin; ///< Rendering plugin 00038 00039 ConstantParams<View> _params; 00040 00041 public: 00042 ConstantProcess( ConstantPlugin& instance ); 00043 00044 void setup( const OFX::RenderArguments& args ); 00045 00046 ConstantParams<View> getParams(); 00047 00048 void multiThreadProcessImages( const OfxRectI& procWindowRoW ); 00049 }; 00050 00051 } 00052 } 00053 } 00054 00055 #include "ConstantProcess.tcc" 00056 00057 #endif