TuttleOFX  1
ImageStatisticsPlugin.hpp
Go to the documentation of this file.
00001 #ifndef _TUTTLE_PLUGIN_IMAGESTATISTICS_PLUGIN_HPP_
00002 #define _TUTTLE_PLUGIN_IMAGESTATISTICS_PLUGIN_HPP_
00003 
00004 #include "ImageStatisticsDefinitions.hpp"
00005 #include <tuttle/plugin/ImageEffectGilPlugin.hpp>
00006 
00007 namespace tuttle {
00008 namespace plugin {
00009 namespace imageStatistics {
00010 
00011 struct ImageStatisticsProcessParams
00012 {
00013         OfxRectI _rect; ///< the selected rectangle, clipped to the image rod
00014         EParamChooseOutput _chooseOutput;
00015 };
00016 
00017 /**
00018  * @brief ImageStatistics plugin
00019  */
00020 class ImageStatisticsPlugin : public ImageEffectGilPlugin
00021 {
00022 public:
00023         ImageStatisticsPlugin( OfxImageEffectHandle handle );
00024 
00025 public:
00026         void render( const OFX::RenderArguments& args );
00027         void changedParam( const OFX::InstanceChangedArgs& args, const std::string& paramName );
00028 
00029         void getRegionsOfInterest( const OFX::RegionsOfInterestArguments& args, OFX::RegionOfInterestSetter& rois );
00030 
00031         ImageStatisticsProcessParams getProcessParams( const OfxRectI& srcRod ) const;
00032 
00033 public:
00034         OFX::ChoiceParam* _paramCoordinateSystem;
00035         OFX::Double2DParam* _paramRectCenter;
00036         OFX::Double2DParam* _paramRectSize;
00037         OFX::ChoiceParam* _paramChooseOutput;
00038 
00039         OFX::RGBAParam* _paramOutputAverage;
00040         OFX::RGBAParam* _paramOutputVariance;
00041         OFX::RGBAParam* _paramOutputChannelMin;
00042         OFX::RGBAParam* _paramOutputChannelMax;
00043         OFX::RGBAParam* _paramOutputLuminosityMin;
00044         OFX::RGBAParam* _paramOutputLuminosityMax;
00045         OFX::RGBAParam* _paramOutputKurtosis;
00046         OFX::RGBAParam* _paramOutputSkewness;
00047 
00048         OFX::Double3DParam* _paramOutputAverageHSL;
00049         OFX::Double3DParam* _paramOutputChannelMinHSL;
00050         OFX::Double3DParam* _paramOutputChannelMaxHSL;
00051         OFX::Double3DParam* _paramOutputLuminosityMinHSL;
00052         OFX::Double3DParam* _paramOutputLuminosityMaxHSL;
00053         OFX::Double3DParam* _paramOutputKurtosisHSL;
00054         OFX::Double3DParam* _paramOutputSkewnessHSL;
00055 };
00056 
00057 }
00058 }
00059 }
00060 
00061 #endif