TuttleOFX  1
ColorBarsProcess.hpp
Go to the documentation of this file.
00001 #ifndef _TUTTLE_PLUGIN_COLORBARS_PROCESS_HPP_
00002 #define _TUTTLE_PLUGIN_COLORBARS_PROCESS_HPP_
00003 
00004 #include <terry/globals.hpp>
00005 #include <tuttle/plugin/ImageGilProcessor.hpp>
00006 #include <terry/generator/colorbars.hpp>
00007 
00008 #include <ofxsImageEffect.h>
00009 #include <ofxsMultiThread.h>
00010 
00011 #include <boost/gil/gil_all.hpp>
00012 #include <boost/scoped_ptr.hpp>
00013 
00014 namespace tuttle {
00015 namespace plugin {
00016 namespace colorBars {
00017 
00018 /**
00019  * @brief ColorBars process
00020  *
00021  */
00022 template<class View>
00023 class ColorBarsProcess : public ImageGilProcessor<View>
00024 {
00025 public:
00026         typedef typename View::value_type Pixel;
00027         typedef terry::generator::ColorBarsFunctor<Pixel> ColorBarsFunctorT;
00028         typedef typename ColorBarsFunctorT::point_t Point;
00029         typedef boost::gil::virtual_2d_locator<ColorBarsFunctorT, false> Locator;
00030         typedef boost::gil::image_view<Locator> ColorBarsVirtualView;
00031         
00032 protected:
00033         ColorBarsPlugin&     _plugin;   ///< Rendering plugin
00034         ColorBarsVirtualView _srcView;  ///< Source view
00035 
00036 public:
00037         ColorBarsProcess( ColorBarsPlugin& instance );
00038 
00039         void setup( const OFX::RenderArguments& args );
00040 
00041         void multiThreadProcessImages( const OfxRectI& procWindowRoW );
00042 };
00043 
00044 }
00045 }
00046 }
00047 
00048 #include "ColorBarsProcess.tcc"
00049 
00050 #endif