TuttleOFX  1
MathOperatorProcess.hpp
Go to the documentation of this file.
00001 #ifndef _TUTTLE_PLUGIN_MATHOPERATOR_PROCESS_HPP_
00002 #define _TUTTLE_PLUGIN_MATHOPERATOR_PROCESS_HPP_
00003 
00004 #include <tuttle/plugin/ImageGilFilterProcessor.hpp>
00005 
00006 namespace tuttle {
00007 namespace plugin {
00008 namespace mathOperator {
00009 
00010 /**
00011  * @brief MathOperator process
00012  *
00013  */
00014 template<class View>
00015 class MathOperatorProcess : public ImageGilFilterProcessor<View>
00016 {
00017 public:
00018         typedef typename View::value_type Pixel;
00019         typedef typename boost::gil::channel_type<View>::type Channel;
00020         typedef float Scalar;
00021 protected:
00022     MathOperatorPlugin&    _plugin;            ///< Rendering plugin
00023         MathOperatorProcessParams<Scalar> _params; ///< parameters
00024 
00025 public:
00026     MathOperatorProcess( MathOperatorPlugin& effect );
00027 
00028         void setup( const OFX::RenderArguments& args );
00029 
00030     void multiThreadProcessImages( const OfxRectI& procWindowRoW );
00031 
00032 private:
00033         void processImagePlus     ( OfxRectI& procWindowOutput, const OfxRectI& procWindowRoW, const boost::gil::rgba32f_pixel_t& values, const boost::gil::rgba8_pixel_t& processChannel );
00034         void processImageMultiply ( OfxRectI& procWindowOutput, const OfxRectI& procWindowRoW, const boost::gil::rgba32f_pixel_t& values, const boost::gil::rgba8_pixel_t& processChannel );
00035         void processImagePow      ( OfxRectI& procWindowOutput, const OfxRectI& procWindowRoW, const boost::gil::rgba32f_pixel_t& values, const boost::gil::rgba8_pixel_t& processChannel );
00036         void processImageSqrt     ( OfxRectI& procWindowOutput, const OfxRectI& procWindowRoW, const boost::gil::rgba32f_pixel_t& values, const boost::gil::rgba8_pixel_t& processChannel );
00037         void processImageLog      ( OfxRectI& procWindowOutput, const OfxRectI& procWindowRoW, const boost::gil::rgba32f_pixel_t& values, const boost::gil::rgba8_pixel_t& processChannel );
00038         void processImageLn       ( OfxRectI& procWindowOutput, const OfxRectI& procWindowRoW, const boost::gil::rgba32f_pixel_t& values, const boost::gil::rgba8_pixel_t& processChannel );
00039 };
00040 
00041 }
00042 }
00043 }
00044 
00045 #include "MathOperatorProcess.tcc"
00046 
00047 #endif