TuttleOFX  1
MergeProcess.hpp
Go to the documentation of this file.
00001 #ifndef _TUTTLE_PLUGIN_MERGE_PROCESS_HPP_
00002 #define _TUTTLE_PLUGIN_MERGE_PROCESS_HPP_
00003 
00004 #include <tuttle/plugin/ImageGilProcessor.hpp>
00005 #include <tuttle/plugin/exceptions.hpp>
00006 
00007 #include <boost/gil/gil_all.hpp>
00008 #include <boost/scoped_ptr.hpp>
00009 
00010 namespace tuttle {
00011 namespace plugin {
00012 namespace merge {
00013 
00014 /**
00015  * @brief Merge process
00016  */
00017 template<class View, class Functor>
00018 class MergeProcess : public ImageGilProcessor<View>
00019 {
00020 public:
00021         typedef typename View::value_type Pixel;
00022         
00023 protected:
00024         MergePlugin& _plugin; ///< Rendering plugin
00025 
00026         MergeProcessParams<MergePlugin::Scalar> _params;
00027 
00028         View _srcViewA; ///< Source view A
00029         View _srcViewB; ///< Source view B
00030         boost::scoped_ptr<OFX::Image> _srcA;
00031         boost::scoped_ptr<OFX::Image> _srcB;
00032         OfxRectI _srcPixelRodA;
00033         OfxRectI _srcPixelRodB;
00034 
00035 public:
00036         MergeProcess( MergePlugin& instance );
00037 
00038         void setup( const OFX::RenderArguments& args );
00039 
00040         void multiThreadProcessImages( const OfxRectI& procWindowRoW );
00041 };
00042 
00043 }
00044 }
00045 }
00046 
00047 #include "MergeProcess.tcc"
00048 
00049 #endif