Image Utilities (IU)
|
Device 2D image class (pitched memory). More...
#include <image_gpu.h>
Data Structures | |
struct | KernelData |
Struct pointer KernelData that can be used in CUDA kernels. More... | |
Public Types | |
typedef PixelType | pixel_type |
Public Member Functions | |
ImageGpu () | |
virtual | ~ImageGpu () |
ImageGpu (unsigned int _width, unsigned int _height) | |
ImageGpu (const iu::Size< 2 > &size) | |
ImageGpu (PixelType *_data, unsigned int _width, unsigned int _height, size_t _pitch, bool ext_data_pointer=false) | |
PixelType | getPixel (unsigned int x, unsigned int y) |
virtual size_t | bytes () const |
virtual size_t | pitch () const |
virtual size_t | stride () const |
virtual unsigned int | bitDepth () const |
virtual bool | onDevice () const |
PixelType * | data (int ox=0, int oy=0) |
const PixelType * | data (int ox=0, int oy=0) const |
thrust::device_ptr< PixelType > | begin (void) |
thrust::device_ptr< PixelType > | end (void) |
void | prepareTexture (cudaTextureReadMode readMode=cudaReadModeElementType, cudaTextureFilterMode filterMode=cudaFilterModeLinear, cudaTextureAddressMode addressMode=cudaAddressModeClamp) |
cudaTextureObject_t | getTexture () |
cudaTextureObject_t | getTexture () const |
ndarray_ref< PixelType, 2 > | ref () const |
ImageGpu (const ndarray_ref< PixelType, 2 > &x) | |
Public Member Functions inherited from iu::Image | |
Image () | |
virtual | ~Image () |
Image (unsigned int width, unsigned int height) | |
Image (const iu::Size< 2 > &size) | |
iu::Size< 2 > | size () const |
unsigned int | width () const |
unsigned int | height () const |
bool | sameType (const Image &from) |
size_t | numel () const |
Protected Attributes | |
PixelType * | data_ |
size_t | pitch_ |
bool | ext_data_pointer_ |
cudaTextureObject_t | texture_ |
Protected Attributes inherited from iu::Image | |
iu::Size< 2 > | size_ |
Device 2D image class (pitched memory).
typedef PixelType iu::ImageGpu< PixelType, Allocator >::pixel_type |
Define the current pixel type.
|
inline |
Constructor.
|
inlinevirtual |
Destructor.
|
inline |
|
inline |
|
inline |
iu::ImageGpu< PixelType, Allocator >::ImageGpu | ( | const ndarray_ref< PixelType, 2 > & | x | ) |
construct from ndarray_ref – include ndarray/ndarray_iu.h
|
inline |
Returns a thrust pointer that can be used in custom operators
|
inlinevirtual |
Returns the bit depth of the data pointer.
Reimplemented from iu::Image.
|
inlinevirtual |
Returns the total amount of bytes saved in the data buffer.
Reimplemented from iu::Image.
|
inline |
Returns a pointer to the pixel data. The pointer can be offset to position (ox/oy).
ox | Horizontal offset of the pointer array. |
oy | Vertical offset of the pointer array. |
|
inline |
Returns a const pointer to the pixel data. The pointer can be offset to position (ox/oy).
ox | Horizontal offset of the pointer array. |
oy | Vertical offset of the pointer array. |
|
inline |
Returns a thrust pointer that can be used in custom operators
|
inline |
Get Pixel value at position x,y.
|
inline |
Get CUDA texture object
|
inline |
Get CUDA texture object
|
inlinevirtual |
Returns flag if the image data resides on the device/GPU (TRUE) or host/GPU (FALSE)
Reimplemented from iu::Image.
|
inlinevirtual |
Returns the distance in bytes between starts of consecutive rows.
Reimplemented from iu::Image.
|
inline |
Prepare CUDA texture
readMode | CUDA texture read mode |
filterMode | CUDA texture filter mode |
addressMode | CUDA texture address mode |
ndarray_ref<PixelType,2> iu::ImageGpu< PixelType, Allocator >::ref | ( | ) | const |
convert to ndarray_ref – include ndarray/ndarray_iu.h
|
inlinevirtual |
|
protected |
Pointer to device buffer.
|
protected |
Flag if data pointer is handled outside the image class.
|
protected |
Distance in bytes between starts of consecutive rows.
|
protected |
CUDA texture object