Basic Image AlgorithmS Library
2.8.0
|
OpenCL Image3D wrapper. More...
#include <OpenCLFramework/clfImage3D.hh>
Public Member Functions | |
void | Allocate (BIAS::ImageBase::EStorageType st, BIAS::ImageBase::EColorModel cm, unsigned int width, unsigned int height, unsigned int levels, unsigned int stride=0, bool readonly=false, bool writeonly=false, const void *hostptr=NULL, bool copy=false) |
Allocation of a memory buffer as 3D image, either call directly or use wrapper for BIAS::ImageBase. More... | |
void | AllocateFromBiasTemplate (const BIAS::ImageBase &image, unsigned int levels, bool readonly=false, bool writeonly=false) |
Allocation of a memory buffer as 3D image (2d+level), biasimage is used as template for one level. More... | |
void | AllocateFromTemplate (const clfImage3D &src, bool readonly=false, bool writeonly=false) |
void | AllocateFromTexture3D (BIAS::glfTexture3D &tex, bool readonly=false, bool writeonly=false) |
Allocation of a memory buffer from a GL Texture3D (works only on shared context!) More... | |
void | CopyToBiasImage (BIAS::ImageBase &image, unsigned int level, unsigned int originX=0, unsigned int originY=0, unsigned int regionX=0, unsigned int regionY=0) |
void | CopyToImage (clfImage3D &outputimage, unsigned int srcoriginX=0, unsigned int srcoriginY=0, unsigned int srcoriginZ=0, unsigned int dstoriginX=0, unsigned int dstoriginY=0, unsigned int dstoriginZ=0, unsigned int regionX=0, unsigned int regionY=0, unsigned int regionZ=0) |
void | GetImageDim (unsigned int &width, unsigned int &height, unsigned int &levels) |
std::vector< std::string > | GetSupportedImageFormats (bool readonly=false, bool writeonly=false) |
unsigned int | GLId () |
unsigned int | Height () |
bool | Initialized () |
bool | IsReadOnly () |
bool | IsSharedGL () |
bool | IsWriteOnly () |
unsigned int | Levels () |
void * | MapImage (bool write=false, unsigned int originX=0, unsigned int originY=0, unsigned int originZ=0, unsigned int regionX=0, unsigned int regionY=0, unsigned int regionZ=0) |
void | ReadFromImage (void *data, unsigned int originX=0, unsigned int originY=0, unsigned int originZ=0, unsigned int regionX=0, unsigned int regionY=0, unsigned int regionZ=0) |
read from image to host memory More... | |
unsigned int | Size () |
unsigned int | SlideStride () |
unsigned int | Stride () |
void | UnMap (void *data) |
unsigned int | Width () |
void | WriteToImage (const void *data, unsigned int originX=0, unsigned int originY=0, unsigned int originZ=0, unsigned int regionX=0, unsigned int regionY=0, unsigned int regionZ=0) |
write from host memory to image More... | |
virtual | ~clfImage3D () |
Protected Member Functions | |
clfImage3D (cl::Context *context, cl::CommandQueue *queue) | |
int | DetermineMemFlags_ (bool readonly, bool writeonly, const void *hostptr=NULL, bool copy=false) |
cl::Image3D & | image () |
cl::Memory & | memory () |
Protected Attributes | |
cl::Memory | buffer_ |
cl::Context * | context_ |
unsigned int | glid_ |
bool | initialized_ |
cl::CommandQueue * | queue_ |
bool | sharedGL_ |
unsigned int | size_ |
Friends | |
class | clfContext |
class | clfProgram |
OpenCL Image3D wrapper.
An clfImage3D is used for both cl::Images, host and GL objects. All buffers are created from a valid clfContext, hence the constructor is protected.
Definition at line 45 of file clfImage3D.hh.
|
virtual |
Definition at line 57 of file clfImage3D.cpp.
|
protected |
Definition at line 37 of file clfImage3D.cpp.
References BIAS::ImageBase::CM_invalid, BIAS::clfMemory::context_, and BIAS::ImageBase::ST_invalid.
void clfImage3D::Allocate | ( | BIAS::ImageBase::EStorageType | st, |
BIAS::ImageBase::EColorModel | cm, | ||
unsigned int | width, | ||
unsigned int | height, | ||
unsigned int | levels, | ||
unsigned int | stride = 0 , |
||
bool | readonly = false , |
||
bool | writeonly = false , |
||
const void * | hostptr = NULL , |
||
bool | copy = false |
||
) |
Allocation of a memory buffer as 3D image, either call directly or use wrapper for BIAS::ImageBase.
Definition at line 60 of file clfImage3D.cpp.
References BIAS::clfMemory::buffer_, BIAS::ImageBase::CM_Grey, BIAS::ImageBase::CM_RGB, BIAS::clfMemory::context_, BIAS::clfMemory::DetermineMemFlags_(), BIAS::ImageBase::GetChannelcount(), BIAS::clfMemory::initialized_, BIAS::clfMemory::sharedGL_, BIAS::clfMemory::size_, BIAS::ImageBase::ST_float, and BIAS::ImageBase::ST_unsignedchar.
Referenced by AllocateFromBiasTemplate(), and AllocateFromTemplate().
void clfImage3D::AllocateFromBiasTemplate | ( | const BIAS::ImageBase & | image, |
unsigned int | levels, | ||
bool | readonly = false , |
||
bool | writeonly = false |
||
) |
Allocation of a memory buffer as 3D image (2d+level), biasimage is used as template for one level.
Definition at line 111 of file clfImage3D.cpp.
References Allocate(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetStorageType(), and BIAS::ImageBase::GetWidth().
void clfImage3D::AllocateFromTemplate | ( | const clfImage3D & | src, |
bool | readonly = false , |
||
bool | writeonly = false |
||
) |
Definition at line 118 of file clfImage3D.cpp.
References Allocate().
void clfImage3D::AllocateFromTexture3D | ( | BIAS::glfTexture3D & | tex, |
bool | readonly = false , |
||
bool | writeonly = false |
||
) |
Allocation of a memory buffer from a GL Texture3D (works only on shared context!)
Definition at line 122 of file clfImage3D.cpp.
References BIAS::clfMemory::buffer_, BIAS::clfMemory::context_, BIAS::clfMemory::DetermineMemFlags_(), BIAS::glfTexture::GetTextureID(), BIAS::glfTexture::GetTextureTarget(), BIAS::clfMemory::initialized_, BIAS::clfMemory::sharedGL_, and BIAS::clfMemory::size_.
void clfImage3D::CopyToBiasImage | ( | BIAS::ImageBase & | image, |
unsigned int | level, | ||
unsigned int | originX = 0 , |
||
unsigned int | originY = 0 , |
||
unsigned int | regionX = 0 , |
||
unsigned int | regionY = 0 |
||
) |
Definition at line 248 of file clfImage3D.cpp.
References BIAS::ImageBase::GetChannelcount(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), ReadFromImage(), and BIAS::ImageBase::Release().
void clfImage3D::CopyToImage | ( | clfImage3D & | outputimage, |
unsigned int | srcoriginX = 0 , |
||
unsigned int | srcoriginY = 0 , |
||
unsigned int | srcoriginZ = 0 , |
||
unsigned int | dstoriginX = 0 , |
||
unsigned int | dstoriginY = 0 , |
||
unsigned int | dstoriginZ = 0 , |
||
unsigned int | regionX = 0 , |
||
unsigned int | regionY = 0 , |
||
unsigned int | regionZ = 0 |
||
) |
Definition at line 191 of file clfImage3D.cpp.
References image(), and BIAS::clfMemory::queue_.
|
protectedinherited |
Definition at line 73 of file clfMemory.cpp.
Referenced by Allocate(), BIAS::clfImage2D::Allocate(), BIAS::clfBuffer::Allocate(), BIAS::clfImage2D::AllocateFromTexture2D(), AllocateFromTexture3D(), and BIAS::clfBuffer::AllocateFromVertexBuffer().
|
inline |
Definition at line 103 of file clfImage3D.hh.
std::vector< std::string > clfImage3D::GetSupportedImageFormats | ( | bool | readonly = false , |
bool | writeonly = false |
||
) |
Definition at line 273 of file clfImage3D.cpp.
|
inherited |
Definition at line 47 of file clfMemory.cpp.
References BIAS::clfMemory::glid_, and BIAS::clfMemory::sharedGL_.
|
inline |
Definition at line 71 of file clfImage3D.hh.
|
protected |
Definition at line 140 of file clfImage3D.cpp.
References BIAS::clfMemory::buffer_.
Referenced by CopyToImage(), MapImage(), ReadFromImage(), and WriteToImage().
|
inlineinherited |
Definition at line 37 of file clfMemory.hh.
|
inherited |
Definition at line 62 of file clfMemory.cpp.
References BIAS::clfMemory::buffer_.
Referenced by BIAS::clfRecursiveGauss::FilterGrey(), and BIAS::clfRecursiveGauss::FilterGreyColPacked().
|
inlineinherited |
Definition at line 38 of file clfMemory.hh.
Referenced by BIAS::clfColorConversion::RGBAToPackedGrey(), BIAS::clfColorConversion::RGBToGrey(), and BIAS::clfImage2D::SetStorageAndColorModelInfo().
|
inherited |
Definition at line 67 of file clfMemory.cpp.
References BIAS::clfMemory::buffer_.
|
inline |
Definition at line 72 of file clfImage3D.hh.
void * clfImage3D::MapImage | ( | bool | write = false , |
unsigned int | originX = 0 , |
||
unsigned int | originY = 0 , |
||
unsigned int | originZ = 0 , |
||
unsigned int | regionX = 0 , |
||
unsigned int | regionY = 0 , |
||
unsigned int | regionZ = 0 |
||
) |
Definition at line 218 of file clfImage3D.cpp.
References image(), and BIAS::clfMemory::queue_.
|
protectedinherited |
Definition at line 43 of file clfMemory.cpp.
References BIAS::clfMemory::buffer_.
Referenced by BIAS::clfContext::AcquireGLObject(), BIAS::clfContext::ReleaseGLObject(), and BIAS::clfMemory::UnMap().
void clfImage3D::ReadFromImage | ( | void * | data, |
unsigned int | originX = 0 , |
||
unsigned int | originY = 0 , |
||
unsigned int | originZ = 0 , |
||
unsigned int | regionX = 0 , |
||
unsigned int | regionY = 0 , |
||
unsigned int | regionZ = 0 |
||
) |
read from image to host memory
Definition at line 168 of file clfImage3D.cpp.
References image(), and BIAS::clfMemory::queue_.
Referenced by CopyToBiasImage().
|
inlineinherited |
Definition at line 40 of file clfMemory.hh.
|
inline |
Definition at line 74 of file clfImage3D.hh.
|
inline |
Definition at line 73 of file clfImage3D.hh.
|
inherited |
Definition at line 54 of file clfMemory.cpp.
References BIAS::clfMemory::memory(), and BIAS::clfMemory::queue_.
Referenced by BIAS::clfTrimmedICP::ComputeNearestPoints_(), BIAS::clfTrimmedICP::ComputeOptimalMotion_(), and BIAS::clfImage2D::CopyToBiasImageUncheckedRGBAToRGB().
|
inline |
Definition at line 70 of file clfImage3D.hh.
void clfImage3D::WriteToImage | ( | const void * | data, |
unsigned int | originX = 0 , |
||
unsigned int | originY = 0 , |
||
unsigned int | originZ = 0 , |
||
unsigned int | regionX = 0 , |
||
unsigned int | regionY = 0 , |
||
unsigned int | regionZ = 0 |
||
) |
write from host memory to image
Definition at line 144 of file clfImage3D.cpp.
References image(), and BIAS::clfMemory::queue_.
|
friend |
Definition at line 114 of file clfImage3D.hh.
|
friend |
Definition at line 115 of file clfImage3D.hh.
|
protectedinherited |
Definition at line 56 of file clfMemory.hh.
Referenced by Allocate(), BIAS::clfImage2D::Allocate(), BIAS::clfBuffer::Allocate(), BIAS::clfImage2D::AllocateFromTexture2D(), AllocateFromTexture3D(), BIAS::clfBuffer::AllocateFromVertexBuffer(), BIAS::clfBuffer::buffer(), image(), BIAS::clfImage2D::image(), BIAS::clfMemory::IsReadOnly(), BIAS::clfMemory::IsWriteOnly(), and BIAS::clfMemory::memory().
|
protectedinherited |
Definition at line 54 of file clfMemory.hh.
Referenced by Allocate(), BIAS::clfImage2D::Allocate(), BIAS::clfBuffer::Allocate(), BIAS::clfImage2D::AllocateFromTexture2D(), AllocateFromTexture3D(), BIAS::clfBuffer::AllocateFromVertexBuffer(), BIAS::clfImage2D::clfImage2D(), clfImage3D(), and BIAS::clfMemory::clfMemory().
|
protectedinherited |
Definition at line 61 of file clfMemory.hh.
Referenced by BIAS::clfBuffer::AllocateFromVertexBuffer(), BIAS::clfMemory::clfMemory(), and BIAS::clfMemory::GLId().
|
protectedinherited |
Definition at line 59 of file clfMemory.hh.
Referenced by Allocate(), BIAS::clfImage2D::Allocate(), BIAS::clfBuffer::Allocate(), BIAS::clfImage2D::AllocateFromTexture2D(), AllocateFromTexture3D(), BIAS::clfBuffer::AllocateFromVertexBuffer(), and BIAS::clfMemory::clfMemory().
|
protectedinherited |
Definition at line 55 of file clfMemory.hh.
Referenced by BIAS::clfMemory::clfMemory(), BIAS::clfBuffer::CopyBuffer(), CopyToImage(), BIAS::clfImage2D::CopyToImage(), BIAS::clfBuffer::MapBuffer(), MapImage(), BIAS::clfImage2D::MapImage(), BIAS::clfBuffer::ReadFromBuffer(), ReadFromImage(), BIAS::clfImage2D::ReadFromImage(), BIAS::clfMemory::UnMap(), BIAS::clfBuffer::WriteToBuffer(), WriteToImage(), and BIAS::clfImage2D::WriteToImage().
|
protectedinherited |
Definition at line 60 of file clfMemory.hh.
Referenced by Allocate(), BIAS::clfImage2D::Allocate(), BIAS::clfBuffer::Allocate(), BIAS::clfImage2D::AllocateFromTexture2D(), AllocateFromTexture3D(), BIAS::clfBuffer::AllocateFromVertexBuffer(), BIAS::clfMemory::clfMemory(), and BIAS::clfMemory::GLId().
|
protectedinherited |
Definition at line 58 of file clfMemory.hh.
Referenced by Allocate(), BIAS::clfImage2D::Allocate(), BIAS::clfBuffer::Allocate(), BIAS::clfImage2D::AllocateFromTexture2D(), AllocateFromTexture3D(), BIAS::clfBuffer::AllocateFromVertexBuffer(), BIAS::clfMemory::clfMemory(), BIAS::clfBuffer::CopyBuffer(), BIAS::clfBuffer::MapBuffer(), BIAS::clfBuffer::ReadFromBuffer(), and BIAS::clfBuffer::WriteToBuffer().