TuttleOFX  1
ColorCubeProcess.hpp
Go to the documentation of this file.
00001 #ifndef _TUTTLE_PLUGIN_COLORCUBE_PROCESS_HPP_
00002 #define _TUTTLE_PLUGIN_COLORCUBE_PROCESS_HPP_
00003 
00004 #include <terry/globals.hpp>
00005 #include <tuttle/plugin/ImageGilProcessor.hpp>
00006 #include <terry/generator/colorcube.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 colorCube {
00017 
00018 /**
00019  * @brief ColorCube process
00020  *
00021  */
00022 template<class View>
00023 class ColorCubeProcess : public ImageGilProcessor<View>
00024 {
00025 public:
00026     typedef typename View::value_type Pixel;
00027     typedef terry::generator::ColorCubeFunctor<Pixel> ColorCubeFunctorT;
00028     typedef typename ColorCubeFunctorT::point_t ColorCubePoint;
00029     typedef boost::gil::virtual_2d_locator<ColorCubeFunctorT, false> ColorCubeLocator;
00030     typedef boost::gil::image_view<ColorCubeLocator> ColorCubeVirtualView;
00031 
00032 protected:
00033     ColorCubePlugin&       _plugin; ///< Rendering plugin
00034     ColorCubeVirtualView   _srcColorCubeView;  ///< Source view
00035 
00036     ColorCubeProcessParams _params; ///< parameters
00037 
00038 public:
00039     ColorCubeProcess( ColorCubePlugin& effect );
00040 
00041         void setup( const OFX::RenderArguments& args );
00042 
00043     void multiThreadProcessImages( const OfxRectI& procWindowRoW );
00044 };
00045 
00046 }
00047 }
00048 }
00049 
00050 #include "ColorCubeProcess.tcc"
00051 
00052 #endif