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 () |
memory::IPoolDataPtr & | getPoolData () |
const memory::IPoolDataPtr & | getPoolData () const |
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(), tuttle::host::ofx::property::OfxhSet::setDoubleProperty(), and tuttle::host::ofx::property::OfxhSet::setIntProperty().
void tuttle::host::attribute::Image::copy | ( | Image * | dst, |
Image * | src, | ||
const OfxPointI & | dstCorner, | ||
const OfxPointI & | srcCorner, | ||
const OfxPointI & | count | ||
) | [static] |
Definition at line 280 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 217 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] |
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 124 of file Image.hpp.
References tuttle::host::ofx::imageEffect::OfxhImage::getBounds(), getOrientedRowDistanceBytes(), tuttle::host::ofx::imageEffect::OfxhImage::getRowBytes(), TUTTLE_TLOG_VAR, and TUTTLE_TRACE.
Referenced by copy().
VIEW_T tuttle::host::attribute::Image::getGilView | ( | ) |
Definition at line 142 of file Image.hpp.
References tuttle::host::ofx::imageEffect::OfxhImage::getBounds(), and getRowAbsDistanceBytes().
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 90 of file Image.hpp.
References tuttle::host::ofx::imageEffect::OfxhImage::getBitDepth(), tuttle::host::ofx::imageEffect::OfxhImage::getBounds(), tuttle::host::ofx::imageEffect::OfxhImage::getComponentsType(), getPixelData(), and tuttle::host::ofx::imageEffect::OfxhImage::getRowBytes().
std::size_t tuttle::host::attribute::Image::getMemorySize | ( | ) | const [inline] |
Definition at line 60 of file Image.hpp.
References _memorySize.
std::size_t tuttle::host::attribute::Image::getNbComponents | ( | ) | const [inline] |
Definition at line 68 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 66 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(), and getRowAbsDistanceBytes().
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 73 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().
memory::IPoolDataPtr& tuttle::host::attribute::Image::getPoolData | ( | ) | [inline] |
const memory::IPoolDataPtr& tuttle::host::attribute::Image::getPoolData | ( | ) | const [inline] |
int tuttle::host::attribute::Image::getRowAbsDistanceBytes | ( | ) | const [inline] |
Positive/Absolute distance rows.
Definition at line 64 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(), and getRowAbsDistanceBytes().
void tuttle::host::attribute::Image::setPoolData | ( | const memory::IPoolDataPtr & | pData | ) | [inline] |
Definition at line 51 of file Image.hpp.
References _data, eImageOrientationFromBottomToTop, getOrientedPixelData(), 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(), getPoolData(), 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().