TuttleOFX  1
tuttle::plugin::ImageProcessor Class Reference

Base class that can be used to process images of any type. More...

#include <ImageProcessor.hpp>

Inheritance diagram for tuttle::plugin::ImageProcessor:
Collaboration diagram for tuttle::plugin::ImageProcessor:

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

Detailed Description

Base class that can be used to process images of any type.

Definition at line 29 of file ImageProcessor.hpp.


Constructor & Destructor Documentation

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.


Member Function Documentation

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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]
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().

Here is the call graph for this function:

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().

Here is the call graph for this function:


Field Documentation

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().

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().

OFX::RenderArguments tuttle::plugin::ImageProcessor::_renderArgs [protected]

render arguments

Definition at line 34 of file ImageProcessor.hpp.

Referenced by ImageProcessor(), multiThreadFunction(), process(), and setupAndProcess().

Definition at line 39 of file ImageProcessor.hpp.

Referenced by ImageProcessor(), preProcess(), and setupAndProcess().


The documentation for this class was generated from the following file: