TuttleOFX  1
RawReaderPlugin.hpp
Go to the documentation of this file.
00001 #ifndef _TUTTLE_PLUGIN_RAWREADERPLUGIN_HPP_
00002 #define _TUTTLE_PLUGIN_RAWREADERPLUGIN_HPP_
00003 
00004 #include "RawReaderDefinitions.hpp"
00005 #include <tuttle/plugin/context/ReaderPlugin.hpp>
00006 
00007 namespace tuttle {
00008 namespace plugin {
00009 namespace raw {
00010 namespace reader {
00011 
00012 template<typename Scalar>
00013 struct RawReaderProcessParams
00014 {
00015         std::string    _filepath;       ///< filepath
00016         EFiltering     _filtering;
00017         EInterpolation _interpolation;
00018         float          _gammaPower;
00019         float          _gammaToe;
00020         double         _redAbber;
00021         double         _blueAbber;
00022         
00023         double         _bright;
00024         double         _threshold;
00025         bool           _fourColorRgb;
00026         EDocumentMode  _documentMode;
00027         
00028         EHighlight     _hightlight;
00029         
00030         double         _exposure;
00031         double         _exposurePreserve;
00032         
00033         EWhiteBalance  _whiteBalance;
00034         
00035         boost::gil::point2<Scalar> _greyboxPoint;
00036         boost::gil::point2<Scalar> _greyboxSize;
00037 };
00038 
00039 /**
00040  * @brief Raw reader
00041  *
00042  */
00043 class RawReaderPlugin : public ReaderPlugin
00044 {
00045 public:
00046         typedef float Scalar;
00047         typedef boost::gil::point2<double> Point2;
00048 public:
00049         RawReaderPlugin( OfxImageEffectHandle handle );
00050 
00051 public:
00052         RawReaderProcessParams<Scalar> getProcessParams( const OfxTime time );
00053 
00054         void updateInfos( const OfxTime time );
00055 
00056         void changedParam( const OFX::InstanceChangedArgs& args, const std::string& paramName );
00057         bool getRegionOfDefinition( const OFX::RegionOfDefinitionArguments& args, OfxRectD& rod );
00058         void getClipPreferences( OFX::ClipPreferencesSetter& clipPreferences );
00059 
00060         void render( const OFX::RenderArguments& args );
00061 
00062 public:
00063         /// @name user parameters
00064         /// @{
00065         OFX::ChoiceParam*    _paramFiltering;    ///< Filtering mode
00066         OFX::ChoiceParam*    _paramInterpolation;
00067         
00068         OFX::DoubleParam*    _paramGammaPower;
00069         OFX::DoubleParam*    _paramGammaToe;
00070         OFX::DoubleParam*    _paramRedAbber;
00071         OFX::DoubleParam*    _paramBlueAbber;
00072         
00073         
00074         OFX::DoubleParam*    _paramBright;
00075         OFX::DoubleParam*    _paramThreshold;
00076         OFX::BooleanParam*   _paramFourColorRgb;
00077         OFX::ChoiceParam*    _paramDocumentMode;
00078         
00079         OFX::ChoiceParam*    _paramHighlight;
00080         
00081         OFX::DoubleParam*    _paramExposure;
00082         OFX::DoubleParam*    _paramExposurePreserve;
00083         
00084         OFX::ChoiceParam*    _paramWhiteBalance;
00085         
00086         OFX::Double2DParam*  _paramGreyboxPoint;
00087         OFX::Double2DParam*  _paramGreyboxSize;
00088         
00089         /// metadata
00090         OFX::StringParam*    _paramManufacturer;
00091         OFX::StringParam*    _paramModel;
00092         OFX::IntParam*       _paramIso;
00093         OFX::IntParam*       _paramShutter;
00094         OFX::DoubleParam*    _paramAperture;
00095         OFX::StringParam*    _paramDateOfShooting;
00096         OFX::StringParam*    _paramGPS;
00097         OFX::StringParam*    _paramDesc;
00098         OFX::StringParam*    _paramArtist;
00099         /// @}
00100 };
00101 
00102 }
00103 }
00104 }
00105 }
00106 
00107 #endif