TuttleOFX  1
OFX::Image Class Reference

Wraps up an image. More...

#include <ofxsImageEffect.h>

Collaboration diagram for OFX::Image:

Public Member Functions

 Image (OfxPropertySetHandle props)
 ctor
virtual ~Image ()
 dtor
const PropertySetgetPropertySet () const
PropertySetgetPropertySet ()
EBitDepth getPixelDepth () const
 get the pixel depth
EPixelComponent getPixelComponents () const
 get the components in the image
std::string getPixelComponentsProperty () const
 get the string representing the pixel components
EPreMultiplication getPreMultiplication () const
 premultiplication on the image
OfxPointD getRenderScale () const
 get the scale factor that has been applied to this image
double getPixelAspectRatio () const
 get the scale factor that has been applied to this image
void * getPixelData () const
 get the pixel data for this image
OfxRectI getRegionOfDefinition () const
 get the region of definition (in pixel coordinates) of this image
OfxRectI getBounds () const
 get the bounds on the image data (in pixel coordinates) of this image
OfxPointI getBoundsSize () const
std::size_t getPixelBytes () const
int getRowDistanceBytes () const
 get the distance between 2 rows in bytes, may be negative
std::size_t getBoundsRowDataBytes () const
 get the data row size in bytes, by definition >= 0
std::size_t getBoundsNbPixels () const
std::size_t getBoundsImageDataBytes () const
bool isLinearBuffer () const
EField getField () const
 get the fielding of this image
std::string getUniqueIdentifier () const
 the unique ID of this image
void * getPixelAddress (int x, int y)
 return a pixel pointer

Protected Attributes

PropertySet _imageProps
 the handle that holds this image
void * _pixelData
 the base address of the image
EPixelComponent _pixelComponents
 get the components in the image
int _rowDistanceBytes
 the number of bytes per scanline
int _pixelBytes
 the number of bytes per pixel
EBitDepth _pixelDepth
 get the pixel depth
EPreMultiplication _preMultiplication
 premultiplication on the image
OfxRectI _regionOfDefinition
 the RoD in pixel coordinates, this may be more or less than the bounds!
OfxRectI _bounds
 the bounds on the pixel data
double _pixelAspectRatio
 the pixel aspect ratio
EField _field
 which field this represents
std::string _uniqueID
 the unique ID of this image
OfxPointD _renderScale
 any scaling factor applied to the image

Friends

class Clip
 friend so we get access to ctor

Detailed Description

Wraps up an image.

Definition at line 485 of file ofxsImageEffect.h.


Constructor & Destructor Documentation

OFX::Image::~Image ( ) [virtual]

dtor

Definition at line 832 of file ofxsImageEffect.cpp.

References _imageProps, OfxImageEffectSuiteV1::clipReleaseImage, OFX::Private::gEffectSuite, and OFX::PropertySet::propSetHandle().

Here is the call graph for this function:


Member Function Documentation

OfxRectI OFX::Image::getBounds ( ) const [inline]

get the bounds on the image data (in pixel coordinates) of this image

Definition at line 544 of file ofxsImageEffect.h.

References _bounds.

Referenced by tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::addFrame(), and tuttle::plugin::getGilView().

std::size_t OFX::Image::getBoundsImageDataBytes ( ) const

Definition at line 878 of file ofxsImageEffect.cpp.

References getBoundsNbPixels(), and getPixelBytes().

Here is the call graph for this function:

std::size_t OFX::Image::getBoundsNbPixels ( ) const

Definition at line 872 of file ofxsImageEffect.cpp.

References getBoundsSize(), OfxPointI::x, and OfxPointI::y.

Referenced by getBoundsImageDataBytes().

Here is the call graph for this function:

std::size_t OFX::Image::getBoundsRowDataBytes ( ) const

get the data row size in bytes, by definition >= 0

Definition at line 867 of file ofxsImageEffect.cpp.

References getBoundsSize(), getPixelBytes(), and OfxPointI::x.

Referenced by isLinearBuffer().

Here is the call graph for this function:

OfxPointI OFX::Image::getBoundsSize ( ) const [inline]

Definition at line 546 of file ofxsImageEffect.h.

References _bounds, OfxRectI::x1, OfxRectI::x2, OfxRectI::y1, and OfxRectI::y2.

Referenced by getBoundsNbPixels(), and getBoundsRowDataBytes().

EField OFX::Image::getField ( ) const [inline]

get the fielding of this image

Definition at line 563 of file ofxsImageEffect.h.

References _field.

void * OFX::Image::getPixelAddress ( int  x,
int  y 
)

return a pixel pointer

x and y are in pixel coordinates

If the components are custom, then this will return NULL as the support code can't know the pixel size to do the work.

No attempt made to be uber efficient here.

Definition at line 887 of file ofxsImageEffect.cpp.

References _bounds, _pixelBytes, _pixelData, _rowDistanceBytes, OfxRectI::x1, OfxRectI::y1, and OfxRectI::y2.

double OFX::Image::getPixelAspectRatio ( ) const [inline]

get the scale factor that has been applied to this image

Definition at line 535 of file ofxsImageEffect.h.

References _pixelAspectRatio.

EPixelComponent OFX::Image::getPixelComponents ( ) const [inline]

get the components in the image

Definition at line 523 of file ofxsImageEffect.h.

References _pixelComponents.

Referenced by tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::addFrame(), and getPixelBytes().

std::string OFX::Image::getPixelComponentsProperty ( ) const [inline]

get the string representing the pixel components

Definition at line 526 of file ofxsImageEffect.h.

References _imageProps, kOfxImageEffectPropComponents, and OFX::PropertySet::propGetString().

Here is the call graph for this function:

void* OFX::Image::getPixelData ( ) const [inline]

get the pixel data for this image

Definition at line 538 of file ofxsImageEffect.h.

References _pixelData.

Referenced by tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::addFrame(), and tuttle::plugin::getGilView().

EBitDepth OFX::Image::getPixelDepth ( ) const [inline]

get the pixel depth

Definition at line 520 of file ofxsImageEffect.h.

References _pixelDepth.

Referenced by tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::addFrame(), and getPixelBytes().

EPreMultiplication OFX::Image::getPreMultiplication ( ) const [inline]

premultiplication on the image

Definition at line 529 of file ofxsImageEffect.h.

References _preMultiplication.

const PropertySet& OFX::Image::getPropertySet ( ) const [inline]

Definition at line 515 of file ofxsImageEffect.h.

References _imageProps.

PropertySet& OFX::Image::getPropertySet ( ) [inline]

Definition at line 517 of file ofxsImageEffect.h.

References _imageProps.

OfxRectI OFX::Image::getRegionOfDefinition ( ) const [inline]

get the region of definition (in pixel coordinates) of this image

Definition at line 541 of file ofxsImageEffect.h.

References _regionOfDefinition.

OfxPointD OFX::Image::getRenderScale ( ) const [inline]

get the scale factor that has been applied to this image

Definition at line 532 of file ofxsImageEffect.h.

References _renderScale.

int OFX::Image::getRowDistanceBytes ( ) const [inline]

get the distance between 2 rows in bytes, may be negative

Definition at line 551 of file ofxsImageEffect.h.

References _rowDistanceBytes.

Referenced by tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::addFrame(), tuttle::plugin::getGilView(), and isLinearBuffer().

std::string OFX::Image::getUniqueIdentifier ( ) const [inline]

the unique ID of this image

Definition at line 566 of file ofxsImageEffect.h.

References _uniqueID.

bool OFX::Image::isLinearBuffer ( ) const [inline]

Definition at line 560 of file ofxsImageEffect.h.

References getBoundsRowDataBytes(), and getRowDistanceBytes().

Here is the call graph for this function:


Friends And Related Function Documentation

friend class Clip [friend]

friend so we get access to ctor

Definition at line 492 of file ofxsImageEffect.h.


Field Documentation

the bounds on the pixel data

Definition at line 502 of file ofxsImageEffect.h.

Referenced by getBounds(), getBoundsSize(), getPixelAddress(), and Image().

which field this represents

Definition at line 504 of file ofxsImageEffect.h.

Referenced by getField(), and Image().

the handle that holds this image

Definition at line 489 of file ofxsImageEffect.h.

Referenced by getPixelComponentsProperty(), getPropertySet(), Image(), and ~Image().

double OFX::Image::_pixelAspectRatio [protected]

the pixel aspect ratio

Definition at line 503 of file ofxsImageEffect.h.

Referenced by getPixelAspectRatio(), and Image().

int OFX::Image::_pixelBytes [protected]

the number of bytes per pixel

Definition at line 498 of file ofxsImageEffect.h.

Referenced by getPixelAddress(), and Image().

get the components in the image

Definition at line 495 of file ofxsImageEffect.h.

Referenced by getPixelComponents(), and Image().

void* OFX::Image::_pixelData [protected]

the base address of the image

Definition at line 494 of file ofxsImageEffect.h.

Referenced by getPixelAddress(), getPixelData(), and Image().

get the pixel depth

Definition at line 499 of file ofxsImageEffect.h.

Referenced by getPixelDepth(), and Image().

premultiplication on the image

Definition at line 500 of file ofxsImageEffect.h.

Referenced by getPreMultiplication(), and Image().

the RoD in pixel coordinates, this may be more or less than the bounds!

Definition at line 501 of file ofxsImageEffect.h.

Referenced by getRegionOfDefinition(), and Image().

any scaling factor applied to the image

Definition at line 506 of file ofxsImageEffect.h.

Referenced by getRenderScale(), and Image().

the number of bytes per scanline

Definition at line 496 of file ofxsImageEffect.h.

Referenced by getPixelAddress(), getRowDistanceBytes(), and Image().

std::string OFX::Image::_uniqueID [protected]

the unique ID of this image

Definition at line 505 of file ofxsImageEffect.h.

Referenced by getUniqueIdentifier(), and Image().


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