TuttleOFX
1
|
#include <Image.hpp>
Public Types | |
enum | EImageOrientation { eImageOrientationFromTopToBottom, eImageOrientationFromBottomToTop } |
Public Member Functions | |
Image (ClipImage &clip, const OfxTime time, const OfxRectD &bounds, const EImageOrientation orientation, const int rowDistanceBytes) | |
virtual | ~Image () |
void | setPoolData (const memory::IPoolDataPtr &pData) |
std::string | getFullName () const |
std::size_t | getMemorySize () const |
int | getRowAbsDistanceBytes () const |
Positive/Absolute distance rows. | |
EImageOrientation | getOrientation () const |
std::size_t | getNbComponents () const |
int | getOrientedRowDistanceBytes (const EImageOrientation orientation) |
Get distance between rows depending on the requested orientation. | |
boost::uint8_t * | getPixelData () |
void * | getVoidPixelData () |
char * | getCharPixelData () |
boost::uint8_t * | getOrientedPixelData (const EImageOrientation orientation) |
boost::uint8_t * | pixel (const int x, const int y) |
void | getImage (boost::uint8_t *&outData, int &outWidth, int &outHeight, int &outRowSizeBytes, ofx::imageEffect::EBitDepth &outBitDepth, ofx::imageEffect::EPixelComponent &outComponents) |
template<class VIEW_T > | |
VIEW_T | getGilView (const EImageOrientation orientation) |
template<class VIEW_T > | |
VIEW_T | getGilView () |
Static Public Member Functions | |
static void | copy (Image *dst, Image *src, const OfxPointI &dstCorner, const OfxPointI &srcCorner, const OfxPointI &count) |
Copy from Image to Image. | |
Protected Attributes | |
std::size_t | _memorySize |
memory size | |
std::size_t | _pixelBytes |
pixel memory size | |
int | _rowAbsDistanceBytes |
positive memory size for the distance between rows | |
OfxRectI | _bounds |
EImageOrientation | _orientation |
std::string | _fullname |
memory::IPoolDataPtr | _data |
where we are keeping our image data | |
Static Private Member Functions | |
template<class S_VIEW > | |
static void | copy (Image *dst, S_VIEW &src, const OfxPointI &dstCorner, const OfxPointI &srcCorner, const OfxPointI &count) |
Copy from gil image view to Image. | |
template<class D_VIEW , class S_VIEW > | |
static void | copy (D_VIEW &dst, S_VIEW &src, const OfxPointI &dstCorner, const OfxPointI &srcCorner, const OfxPointI &count) |
tuttle::host::attribute::Image::Image | ( | ClipImage & | clip, |
const OfxTime | time, | ||
const OfxRectD & | bounds, | ||
const EImageOrientation | orientation, | ||
const int | rowDistanceBytes | ||
) |
Definition at line 22 of file Image.cpp.
References _bounds, _memorySize, _pixelBytes, _rowAbsDistanceBytes, eImageOrientationFromBottomToTop, getOrientedRowDistanceBytes(), tuttle::host::ofx::attribute::OfxhClipImage::getPixelAspectRatio(), kOfxImageEffectPropRenderScale, kOfxImagePropBounds, kOfxImagePropRegionOfDefinition, kOfxImagePropRowBytes, tuttle::host::ofx::property::OfxhSet::setDoubleProperty(), tuttle::host::ofx::property::OfxhSet::setIntProperty(), OfxPointI::x, OfxRectI::x1, OfxRectD::x1, OfxRectI::x2, OfxRectD::x2, OfxPointI::y, OfxRectI::y1, OfxRectD::y1, OfxRectI::y2, and OfxRectD::y2.
void tuttle::host::attribute::Image::copy | ( | Image * | dst, |
Image * | src, | ||
const OfxPointI & | dstCorner, | ||
const OfxPointI & | srcCorner, | ||
const OfxPointI & | count | ||
) | [static] |
Definition at line 256 of file Image.cpp.
References tuttle::ofx::imageEffect::eBitDepthFloat, tuttle::ofx::imageEffect::eBitDepthUByte, tuttle::ofx::imageEffect::eBitDepthUShort, tuttle::ofx::imageEffect::ePixelComponentAlpha, tuttle::ofx::imageEffect::ePixelComponentRGBA, tuttle::host::ofx::imageEffect::OfxhImage::getBitDepth(), tuttle::host::ofx::imageEffect::OfxhImage::getComponentsType(), and getGilView().
Referenced by copy().
void tuttle::host::attribute::Image::copy | ( | Image * | dst, |
S_VIEW & | src, | ||
const OfxPointI & | dstCorner, | ||
const OfxPointI & | srcCorner, | ||
const OfxPointI & | count | ||
) | [static, private] |
Copy from gil image view to Image.
Definition at line 193 of file Image.cpp.
References copy(), tuttle::ofx::imageEffect::eBitDepthFloat, tuttle::ofx::imageEffect::eBitDepthUByte, tuttle::ofx::imageEffect::eBitDepthUShort, tuttle::ofx::imageEffect::ePixelComponentAlpha, tuttle::ofx::imageEffect::ePixelComponentRGBA, tuttle::host::ofx::imageEffect::OfxhImage::getBitDepth(), tuttle::host::ofx::imageEffect::OfxhImage::getComponentsType(), and getGilView().
void tuttle::host::attribute::Image::copy | ( | D_VIEW & | dst, |
S_VIEW & | src, | ||
const OfxPointI & | dstCorner, | ||
const OfxPointI & | srcCorner, | ||
const OfxPointI & | count | ||
) | [static, private] |
Definition at line 112 of file Image.cpp.
References terry::subimage_view(), OfxPointI::x, and OfxPointI::y.
char * tuttle::host::attribute::Image::getCharPixelData | ( | ) |
std::string tuttle::host::attribute::Image::getFullName | ( | ) | const [inline] |
VIEW_T tuttle::host::attribute::Image::getGilView | ( | const EImageOrientation | orientation | ) |
Definition at line 123 of file Image.hpp.
References tuttle::host::ofx::imageEffect::OfxhImage::getBounds(), getOrientedRowDistanceBytes(), tuttle::host::ofx::imageEffect::OfxhImage::getRowBytes(), TUTTLE_TLOG_VAR, TUTTLE_TRACE, OfxRectI::x1, OfxRectI::x2, OfxRectI::y1, and OfxRectI::y2.
Referenced by copy().
VIEW_T tuttle::host::attribute::Image::getGilView | ( | ) |
Definition at line 141 of file Image.hpp.
References tuttle::host::ofx::imageEffect::OfxhImage::getBounds(), getRowAbsDistanceBytes(), OfxRectI::x1, OfxRectI::x2, OfxRectI::y1, and OfxRectI::y2.
void tuttle::host::attribute::Image::getImage | ( | boost::uint8_t *& | outData, |
int & | outWidth, | ||
int & | outHeight, | ||
int & | outRowSizeBytes, | ||
ofx::imageEffect::EBitDepth & | outBitDepth, | ||
ofx::imageEffect::EPixelComponent & | outComponents | ||
) | [inline] |
Definition at line 87 of file Image.hpp.
References tuttle::host::ofx::imageEffect::OfxhImage::getBitDepth(), tuttle::host::ofx::imageEffect::OfxhImage::getBounds(), tuttle::host::ofx::imageEffect::OfxhImage::getComponentsType(), getPixelData(), tuttle::host::ofx::imageEffect::OfxhImage::getRowBytes(), OfxRectI::x1, OfxRectI::x2, OfxRectI::y1, and OfxRectI::y2.
std::size_t tuttle::host::attribute::Image::getMemorySize | ( | ) | const [inline] |
Definition at line 57 of file Image.hpp.
References _memorySize.
std::size_t tuttle::host::attribute::Image::getNbComponents | ( | ) | const [inline] |
Definition at line 65 of file Image.hpp.
References tuttle::host::ofx::imageEffect::OfxhImage::getComponentsType(), and tuttle::ofx::imageEffect::numberOfComponents().
EImageOrientation tuttle::host::attribute::Image::getOrientation | ( | ) | const [inline] |
Definition at line 63 of file Image.hpp.
References _orientation.
boost::uint8_t * tuttle::host::attribute::Image::getOrientedPixelData | ( | const EImageOrientation | orientation | ) |
Definition at line 84 of file Image.cpp.
References _bounds, _orientation, getPixelData(), getRowAbsDistanceBytes(), OfxRectI::y1, and OfxRectI::y2.
Referenced by setPoolData().
int tuttle::host::attribute::Image::getOrientedRowDistanceBytes | ( | const EImageOrientation | orientation | ) | [inline] |
Get distance between rows depending on the requested orientation.
Definition at line 70 of file Image.hpp.
References _orientation, and _rowAbsDistanceBytes.
Referenced by getGilView(), and Image().
boost::uint8_t * tuttle::host::attribute::Image::getPixelData | ( | ) |
Definition at line 69 of file Image.cpp.
References _data.
Referenced by getImage(), getOrientedPixelData(), and pixel().
int tuttle::host::attribute::Image::getRowAbsDistanceBytes | ( | ) | const [inline] |
Positive/Absolute distance rows.
Definition at line 61 of file Image.hpp.
References _rowAbsDistanceBytes.
Referenced by getGilView(), getOrientedPixelData(), and pixel().
void * tuttle::host::attribute::Image::getVoidPixelData | ( | ) |
boost::uint8_t * tuttle::host::attribute::Image::pixel | ( | const int | x, |
const int | y | ||
) |
Definition at line 98 of file Image.cpp.
References _orientation, _pixelBytes, eImageOrientationFromTopToBottom, tuttle::host::ofx::imageEffect::OfxhImage::getBounds(), getPixelData(), getRowAbsDistanceBytes(), OfxRectI::x1, OfxRectI::x2, OfxRectI::y1, and OfxRectI::y2.
void tuttle::host::attribute::Image::setPoolData | ( | const memory::IPoolDataPtr & | pData | ) | [inline] |
Definition at line 48 of file Image.hpp.
References _data, eImageOrientationFromBottomToTop, getOrientedPixelData(), kOfxImagePropData, and tuttle::host::ofx::property::OfxhSet::setPointerProperty().
OfxRectI tuttle::host::attribute::Image::_bounds [protected] |
Definition at line 38 of file Image.hpp.
Referenced by getOrientedPixelData(), and Image().
where we are keeping our image data
Definition at line 41 of file Image.hpp.
Referenced by getCharPixelData(), getPixelData(), getVoidPixelData(), and setPoolData().
std::string tuttle::host::attribute::Image::_fullname [protected] |
Definition at line 40 of file Image.hpp.
Referenced by getFullName().
std::size_t tuttle::host::attribute::Image::_memorySize [protected] |
Definition at line 39 of file Image.hpp.
Referenced by getOrientation(), getOrientedPixelData(), getOrientedRowDistanceBytes(), and pixel().
std::size_t tuttle::host::attribute::Image::_pixelBytes [protected] |
int tuttle::host::attribute::Image::_rowAbsDistanceBytes [protected] |
positive memory size for the distance between rows
Definition at line 37 of file Image.hpp.
Referenced by getOrientedRowDistanceBytes(), getRowAbsDistanceBytes(), and Image().