TuttleOFX
1
|
Base class that can be used to process images of any type. More...
#include <ImageProcessor.hpp>
Public Member Functions | |
ImageProcessor (OFX::ImageEffect &effect, const EImageOrientation imageOrientation) | |
ctor | |
virtual | ~ImageProcessor () |
void | setNoMultiThreading () |
void | setNbThreads (const unsigned int nbThreads) |
void | setNbThreadsAuto () |
virtual void | preProcess () |
called before any MP is done | |
virtual void | postProcess () |
called before any MP is done | |
virtual void | setup (const OFX::RenderArguments &args) |
virtual void | setupAndProcess (const OFX::RenderArguments &args) |
fetch output and inputs clips | |
void | multiThreadFunction (const unsigned int threadId, const unsigned int nThreads) |
overridden from OFX::MultiThread::Processor. This function is called once on each SMP thread by the base class | |
virtual void | multiThreadProcessImages (const OfxRectI &windowRoW)=0 |
this is called by multiThreadFunction to actually process images, override in derived classes | |
OfxRectI | translateRoWToOutputClipCoordinates (const OfxRectI &windowRoW) const |
virtual void | process () |
called to process everything | |
Protected Attributes | |
OFX::ImageEffect & | _effect |
effect to render with | |
OFX::RenderArguments | _renderArgs |
render arguments | |
OFX::Clip * | _clipDst |
Destination image clip. | |
boost::scoped_ptr< OFX::Image > | _dst |
OfxRectI | _dstPixelRod |
OfxPointI | _dstPixelRodSize |
OfxPointI | _renderWindowSize |
EImageOrientation | _imageOrientation |
Private Attributes | |
unsigned int | _nbThreads |
Base class that can be used to process images of any type.
Definition at line 29 of file ImageProcessor.hpp.
tuttle::plugin::ImageProcessor::ImageProcessor | ( | OFX::ImageEffect & | effect, |
const EImageOrientation | imageOrientation | ||
) | [inline] |
ctor
Definition at line 47 of file ImageProcessor.hpp.
References _clipDst, _dstPixelRod, _dstPixelRodSize, _renderArgs, and _renderWindowSize.
virtual tuttle::plugin::ImageProcessor::~ImageProcessor | ( | ) | [inline, virtual] |
Definition at line 64 of file ImageProcessor.hpp.
void tuttle::plugin::ImageProcessor::multiThreadFunction | ( | const unsigned int | threadId, |
const unsigned int | nThreads | ||
) | [inline] |
overridden from OFX::MultiThread::Processor. This function is called once on each SMP thread by the base class
Definition at line 143 of file ImageProcessor.hpp.
References _renderArgs, and multiThreadProcessImages().
virtual void tuttle::plugin::ImageProcessor::multiThreadProcessImages | ( | const OfxRectI & | windowRoW | ) | [pure virtual] |
this is called by multiThreadFunction to actually process images, override in derived classes
Referenced by multiThreadFunction().
virtual void tuttle::plugin::ImageProcessor::postProcess | ( | ) | [inline, virtual] |
called before any MP is done
Definition at line 75 of file ImageProcessor.hpp.
References tuttle::plugin::OfxProgress::progressEnd().
Referenced by process().
virtual void tuttle::plugin::ImageProcessor::preProcess | ( | ) | [inline, virtual] |
called before any MP is done
Definition at line 72 of file ImageProcessor.hpp.
References _renderWindowSize, and tuttle::plugin::OfxProgress::progressBegin().
Referenced by process().
virtual void tuttle::plugin::ImageProcessor::process | ( | ) | [inline, virtual] |
called to process everything
Definition at line 169 of file ImageProcessor.hpp.
References _nbThreads, _renderArgs, postProcess(), and preProcess().
Referenced by setupAndProcess().
void tuttle::plugin::ImageProcessor::setNbThreads | ( | const unsigned int | nbThreads | ) | [inline] |
Definition at line 68 of file ImageProcessor.hpp.
References _nbThreads.
void tuttle::plugin::ImageProcessor::setNbThreadsAuto | ( | ) | [inline] |
Definition at line 69 of file ImageProcessor.hpp.
References _nbThreads.
void tuttle::plugin::ImageProcessor::setNoMultiThreading | ( | ) | [inline] |
Definition at line 67 of file ImageProcessor.hpp.
References _nbThreads.
virtual void tuttle::plugin::ImageProcessor::setup | ( | const OFX::RenderArguments & | args | ) | [inline, virtual] |
Reimplemented in tuttle::plugin::ImageFilterProcessor, tuttle::plugin::ImageGilProcessor< View >, tuttle::plugin::ImageGilProcessor< DView >, and tuttle::plugin::ImageGilFilterProcessor< SView, DView >.
Definition at line 77 of file ImageProcessor.hpp.
References _clipDst, _dst, _dstPixelRod, _dstPixelRodSize, and tuttle::quotes().
Referenced by setupAndProcess().
virtual void tuttle::plugin::ImageProcessor::setupAndProcess | ( | const OFX::RenderArguments & | args | ) | [inline, virtual] |
fetch output and inputs clips
Definition at line 106 of file ImageProcessor.hpp.
References _effect, _renderArgs, _renderWindowSize, process(), tuttle::plugin::OfxProgress::progressEnd(), and setup().
OfxRectI tuttle::plugin::ImageProcessor::translateRoWToOutputClipCoordinates | ( | const OfxRectI & | windowRoW | ) | const [inline] |
Definition at line 163 of file ImageProcessor.hpp.
References _dstPixelRod, and tuttle::translateRegion().
Referenced by tuttle::plugin::ImageGilProcessor< DView >::setup().
OFX::Clip* tuttle::plugin::ImageProcessor::_clipDst [protected] |
Destination image clip.
Definition at line 35 of file ImageProcessor.hpp.
Referenced by ImageProcessor(), and setup().
boost::scoped_ptr<OFX::Image> tuttle::plugin::ImageProcessor::_dst [protected] |
Definition at line 36 of file ImageProcessor.hpp.
Referenced by tuttle::plugin::ImageGilProcessor< DView >::setup(), and setup().
OfxRectI tuttle::plugin::ImageProcessor::_dstPixelRod [protected] |
Definition at line 37 of file ImageProcessor.hpp.
Referenced by ImageProcessor(), tuttle::plugin::ImageGilProcessor< DView >::setup(), setup(), and translateRoWToOutputClipCoordinates().
OfxPointI tuttle::plugin::ImageProcessor::_dstPixelRodSize [protected] |
Definition at line 38 of file ImageProcessor.hpp.
Referenced by ImageProcessor(), and setup().
OFX::ImageEffect& tuttle::plugin::ImageProcessor::_effect [protected] |
effect to render with
Reimplemented from tuttle::plugin::OfxProgress.
Definition at line 33 of file ImageProcessor.hpp.
Referenced by setupAndProcess().
Definition at line 40 of file ImageProcessor.hpp.
Referenced by tuttle::plugin::ImageGilProcessor< DView >::getCustomView(), and tuttle::plugin::ImageGilProcessor< DView >::getView().
unsigned int tuttle::plugin::ImageProcessor::_nbThreads [private] |
Definition at line 43 of file ImageProcessor.hpp.
Referenced by process(), setNbThreads(), setNbThreadsAuto(), and setNoMultiThreading().
OFX::RenderArguments tuttle::plugin::ImageProcessor::_renderArgs [protected] |
render arguments
Definition at line 34 of file ImageProcessor.hpp.
Referenced by ImageProcessor(), multiThreadFunction(), process(), and setupAndProcess().
OfxPointI tuttle::plugin::ImageProcessor::_renderWindowSize [protected] |
Definition at line 39 of file ImageProcessor.hpp.
Referenced by ImageProcessor(), preProcess(), and setupAndProcess().