TuttleOFX
1
|
00001 #ifndef _TUTTLE_PLUGIN_GAMMA_PLUGIN_HPP_ 00002 #define _TUTTLE_PLUGIN_GAMMA_PLUGIN_HPP_ 00003 00004 #include "GammaDefinitions.hpp" 00005 00006 #include <tuttle/plugin/ImageEffectGilPlugin.hpp> 00007 00008 namespace tuttle { 00009 namespace plugin { 00010 namespace gamma { 00011 00012 template<typename Scalar> 00013 struct GammaProcessParams 00014 { 00015 double iRGamma, 00016 iGGamma, 00017 iBGamma, 00018 iAGamma; 00019 }; 00020 00021 /** 00022 * @brief Gamma plugin 00023 */ 00024 class GammaPlugin : public ImageEffectGilPlugin 00025 { 00026 public: 00027 typedef float Scalar; 00028 00029 public: 00030 GammaPlugin( OfxImageEffectHandle handle ); 00031 00032 public: 00033 void render( const OFX::RenderArguments& args ); 00034 void changedParam( const OFX::InstanceChangedArgs& args, const std::string& paramName ); 00035 00036 GammaProcessParams<Scalar> getProcessParams( const OfxPointD& renderScale = OFX::kNoRenderScale ) const; 00037 00038 public: 00039 OFX::ChoiceParam* _gammaType; 00040 OFX::DoubleParam* _master; 00041 OFX::DoubleParam* _red; 00042 OFX::DoubleParam* _green; 00043 OFX::DoubleParam* _blue; 00044 OFX::DoubleParam* _alpha; 00045 OFX::BooleanParam* _invert; 00046 EGammaType getGammaType() const { return static_cast<EGammaType>( _gammaType->getValue() ); } 00047 }; 00048 00049 } 00050 } 00051 } 00052 00053 #endif