TuttleOFX  1
AnisotropicTensorsProcess.hpp
Go to the documentation of this file.
00001 #ifndef _TUTTLE_PLUGIN_TENSORS_PROCESS_HPP_
00002 #define _TUTTLE_PLUGIN_TENSORS_PROCESS_HPP_
00003 
00004 #include "AnisotropicTensorsPluginFactory.hpp"
00005 #include "AnisotropicTensorsPlugin.hpp"
00006 #include <imageUtils/ImageTensors.hpp>
00007 
00008 #include <terry/globals.hpp>
00009 #include <tuttle/common/math/rectOp.hpp>
00010 #include <tuttle/common/utils/global.hpp>
00011 #include <tuttle/plugin/ImageGilFilterProcessor.hpp>
00012 #include <tuttle/plugin/IProgress.hpp>
00013 #include <tuttle/plugin/exceptions.hpp>
00014 
00015 #include <ofxsImageEffect.h>
00016 #include <ofxsMultiThread.h>
00017 #include <boost/gil/gil_all.hpp>
00018 #include <boost/scoped_ptr.hpp>
00019 
00020 namespace tuttle {
00021 namespace plugin {
00022 namespace anisotropicFilter {
00023 namespace tensors {
00024 
00025 /**
00026  * @brief Base class for the generic processor
00027  */
00028 template<class View>
00029 class AnisotropicTensorsProcess : public ImageGilFilterProcessor<View>
00030 {
00031 public:
00032     typedef typename View::value_type Pixel;
00033 protected:
00034     TensorsPlugin& _plugin; ///< Tensor rendering plugin
00035     OfxRectI _upScaledSrcBounds, _dBounds;
00036     OFX::BooleanParam *_algorithm; ///< Generation algorithm
00037     OFX::ChoiceParam *_stAlgo; ///< Structure tensors algorithm
00038     OFX::DoubleParam *_alpha; ///< Pre-blurring (noise scale)
00039     OFX::DoubleParam *_sigma; ///< Post-blurring
00040     OFX::DoubleParam *_sharpness; ///< Contour preservation
00041     OFX::DoubleParam *_anisotropy; ///< Anisotropic filtering
00042     OFX::DoubleParam *_geom_fact; ///< Geometry factor
00043     OFX::DoubleParam *_threshold; ///< Thresholding quantization factor
00044 
00045 public:
00046         AnisotropicTensorsProcess( TensorsPlugin &instance );
00047 
00048     void setup( const OFX::RenderArguments &args );
00049 
00050         void multiThreadProcessImages( const OfxRectI& procWindowRoW );
00051 };
00052 
00053 
00054 }
00055 }
00056 }
00057 }
00058 
00059 #include "AnisotropicTensorsProcess.tcc"
00060 
00061 #endif