TuttleOFX
1
|
Wraps up an image. More...
#include <ofxsImageEffect.h>
Public Member Functions | |
Image (OfxPropertySetHandle props) | |
ctor | |
virtual | ~Image () |
dtor | |
const PropertySet & | getPropertySet () const |
PropertySet & | getPropertySet () |
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 |
Wraps up an image.
Definition at line 485 of file ofxsImageEffect.h.
OFX::Image::Image | ( | OfxPropertySetHandle | props | ) |
ctor
Definition at line 748 of file ofxsImageEffect.cpp.
References _bounds, _field, _imageProps, _pixelAspectRatio, _pixelBytes, _pixelComponents, _pixelData, _pixelDepth, _preMultiplication, _regionOfDefinition, _renderScale, _rowDistanceBytes, _uniqueID, OFX::eBitDepthCustom, OFX::eBitDepthFloat, OFX::eBitDepthNone, OFX::eBitDepthUByte, OFX::eBitDepthUShort, OFX::eFieldBoth, OFX::eFieldLower, OFX::eFieldNone, OFX::ePixelComponentAlpha, OFX::ePixelComponentCustom, OFX::ePixelComponentNone, OFX::ePixelComponentRGB, OFX::ePixelComponentRGBA, OFX::Log::error(), kOfxImageEffectPropComponents, kOfxImageEffectPropPixelDepth, kOfxImageEffectPropPreMultiplication, kOfxImageEffectPropRenderScale, kOfxImageFieldBoth, kOfxImageFieldLower, kOfxImageFieldNone, kOfxImageFieldUpper, kOfxImagePropBounds, kOfxImagePropData, kOfxImagePropField, kOfxImagePropPixelAspectRatio, kOfxImagePropRegionOfDefinition, kOfxImagePropRowBytes, kOfxImagePropUniqueIdentifier, OFX::mapBitDepthStringToEnum(), OFX::mapPixelComponentStringToEnum(), OFX::mapPreMultiplicationStringToEnum(), OFX::PropertySet::propGetDouble(), OFX::PropertySet::propGetInt(), OFX::PropertySet::propGetPointer(), OFX::PropertySet::propGetString(), OFX::Validation::validateImageProperties(), OfxPointD::x, OfxRectI::x1, OfxRectI::x2, OfxPointD::y, OfxRectI::y1, and OfxRectI::y2.
OFX::Image::~Image | ( | ) | [virtual] |
dtor
Definition at line 832 of file ofxsImageEffect.cpp.
References _imageProps, OfxImageEffectSuiteV1::clipReleaseImage, OFX::Private::gEffectSuite, and OFX::PropertySet::propSetHandle().
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().
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().
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().
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] |
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.
std::size_t OFX::Image::getPixelBytes | ( | ) | const |
Definition at line 838 of file ofxsImageEffect.cpp.
References OFX::eBitDepthCustom, OFX::eBitDepthFloat, OFX::eBitDepthNone, OFX::eBitDepthUByte, OFX::eBitDepthUShort, OFX::ePixelComponentAlpha, OFX::ePixelComponentRGB, OFX::ePixelComponentRGBA, getPixelComponents(), and getPixelDepth().
Referenced by getBoundsImageDataBytes(), and getBoundsRowDataBytes().
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().
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] |
bool OFX::Image::isLinearBuffer | ( | ) | const [inline] |
Definition at line 560 of file ofxsImageEffect.h.
References getBoundsRowDataBytes(), and getRowDistanceBytes().
friend class Clip [friend] |
friend so we get access to ctor
Definition at line 492 of file ofxsImageEffect.h.
OfxRectI OFX::Image::_bounds [protected] |
the bounds on the pixel data
Definition at line 502 of file ofxsImageEffect.h.
Referenced by getBounds(), getBoundsSize(), getPixelAddress(), and Image().
EField OFX::Image::_field [protected] |
which field this represents
Definition at line 504 of file ofxsImageEffect.h.
Referenced by getField(), and Image().
PropertySet OFX::Image::_imageProps [protected] |
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().
EPixelComponent OFX::Image::_pixelComponents [protected] |
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().
EBitDepth OFX::Image::_pixelDepth [protected] |
get the pixel depth
Definition at line 499 of file ofxsImageEffect.h.
Referenced by getPixelDepth(), and Image().
EPreMultiplication OFX::Image::_preMultiplication [protected] |
premultiplication on the image
Definition at line 500 of file ofxsImageEffect.h.
Referenced by getPreMultiplication(), and Image().
OfxRectI OFX::Image::_regionOfDefinition [protected] |
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().
OfxPointD OFX::Image::_renderScale [protected] |
any scaling factor applied to the image
Definition at line 506 of file ofxsImageEffect.h.
Referenced by getRenderScale(), and Image().
int OFX::Image::_rowDistanceBytes [protected] |
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().