TuttleOFX
1
|
00001 #ifndef _TUTTLE_PLUGIN_WARP_PROCESS_HPP_ 00002 #define _TUTTLE_PLUGIN_WARP_PROCESS_HPP_ 00003 00004 #include "TPS/tps.hpp" 00005 00006 #include <tuttle/plugin/ImageGilFilterProcessor.hpp> 00007 #include <boost/scoped_ptr.hpp> 00008 00009 namespace tuttle { 00010 namespace plugin { 00011 namespace warp { 00012 00013 /** 00014 * @brief Warp process 00015 * 00016 */ 00017 template<class View> 00018 class WarpProcess : public ImageGilFilterProcessor<View> 00019 { 00020 public: 00021 typedef typename View::value_type Pixel; 00022 typedef typename boost::gil::channel_type<View>::type Channel; 00023 typedef WarpPlugin::Scalar Scalar; 00024 typedef typename View::point_t Point; 00025 typedef typename View::coord_t Coord; 00026 typedef typename terry::image_from_view<View>::type Image; 00027 00028 protected : 00029 WarpPlugin& _plugin; ///< Rendering plugin 00030 00031 00032 OFX::Clip* _clipSrcB; ///< Source B 00033 boost::scoped_ptr<OFX::Image> _srcB; 00034 OfxRectI _srcBPixelRod; 00035 View _srcBView; 00036 00037 WarpProcessParams<Scalar> _params; ///< parameters 00038 TPS_Morpher<Scalar> _tpsA; 00039 TPS_Morpher<Scalar> _tpsB; 00040 00041 public: 00042 WarpProcess( WarpPlugin& effect ); 00043 00044 void setup( const OFX::RenderArguments& args ); 00045 00046 void multiThreadProcessImages( const OfxRectI& procWindowRoW ); 00047 }; 00048 00049 } 00050 } 00051 } 00052 00053 #include "WarpProcess.tcc" 00054 00055 #endif