TuttleOFX  1
OCIOColorSpaceProcess.hpp
Go to the documentation of this file.
00001 #ifndef _TUTTLE_PLUGIN_OCIOCOLORSPACEProcess_HPP_
00002 #define _TUTTLE_PLUGIN_OCIOCOLORSPACEProcess_HPP_
00003 
00004 #include "OCIOColorSpacePlugin.hpp"
00005 
00006 #include <OpenColorIO/OpenColorIO.h>
00007 
00008 #include <tuttle/plugin/global.hpp>
00009 #include <tuttle/plugin/ImageGilFilterProcessor.hpp>
00010 #include <tuttle/plugin/exceptions.hpp>
00011 
00012 #include <ofxsImageEffect.h>
00013 #include <ofxsMultiThread.h>
00014 
00015 #include <boost/gil/gil_all.hpp>
00016 
00017 namespace tuttle
00018 {
00019   namespace plugin
00020   {
00021     namespace ocio
00022     {
00023       namespace colorspace
00024       {
00025 
00026         namespace OCIO = OCIO_NAMESPACE;
00027 
00028         /**
00029          * @brief Lut process
00030          */
00031         template<class View>
00032           class OCIOColorSpaceProcess : public ImageGilFilterProcessor<View>
00033           {
00034           private:
00035             OCIOColorSpacePlugin& _plugin; ///< Rendering plugin
00036             OCIOColorSpaceProcessParams _params; ///< parameters
00037 
00038             OCIO::ConstConfigRcPtr _config;
00039 
00040           public:
00041             OCIOColorSpaceProcess<View>(OCIOColorSpacePlugin & instance);
00042             void
00043             setup(const OFX::RenderArguments& args);
00044 
00045             void
00046             multiThreadProcessImages(const OfxRectI& procWindowRoW);
00047 
00048             // Lut Transform
00049             void
00050             applyLut(View& dst, View& src);
00051           };
00052 
00053       }
00054     }
00055   }
00056 }
00057 
00058 #include "OCIOColorSpaceProcess.tcc"
00059 
00060 #endif