Typedefs | Functions | Variables
contrib/gel/gevd/gevd_pixel.h File Reference
#include "gevd_bufferxy.h"

Go to the source code of this file.

Typedefs

typedef unsigned char byte

Functions

bytebytePixel (gevd_bufferxy &buf, int x, int y)
 Get reference to pixel as a byte/char, unsigned/signed char (8-bit) number, at indexes (x, y) in buf.
char & charPixel (gevd_bufferxy &buf, int x, int y)
 Get reference to pixel as a byte/char, unsigned/signed char (8-bit) number, at indexes (x, y) in buf.
short & shortPixel (gevd_bufferxy &buf, int x, int y)
 Get reference to pixel as a short (16-bit) number, at indexes (x, y) in buf.
unsigned short & ushortPixel (gevd_bufferxy &buf, int x, int y)
 Get reference to pixel as an unsigned short (16-bit) number, at indices (x, y) in buf.
float & floatPixel (gevd_bufferxy &buf, int x, int y)
 Get reference to pixel as a float number, at indexes (x, y) in buf.
void *& ptrPixel (gevd_bufferxy &buf, int x, int y)
 Get reference to pixel as a pointer, at indexes (x, y).
const bytebytePixel (const gevd_bufferxy &buf, int x, int y)
 Get reference to pixel as a byte, at indexes (x, y).
const char & charPixel (const gevd_bufferxy &buf, int x, int y)
 Get reference to pixel as a char, at indexes (x, y).
const short & shortPixel (const gevd_bufferxy &buf, int x, int y)
 Get reference to pixel as a short, at indexes (x, y).
const unsigned short & ushortPixel (const gevd_bufferxy &buf, int x, int y)
 Get reference to pixel as an unsigned short, at indices (x, y).
const float & floatPixel (const gevd_bufferxy &buf, int x, int y)
 Get reference to pixel as a float, at indexes (x, y).
void *const & ptrPixel (const gevd_bufferxy &buf, int x, int y)
 Get const reference to pixel at indexes (x, y).

Variables

const int bits_per_ptr = sizeof(void*) * 8
const int bits_per_float = sizeof(float) * 8
const int bits_per_short = sizeof(short) * 8
const int bits_per_char = sizeof(char) * 8
const int bits_per_byte = sizeof(byte) * 8

Detailed Description

Definition in file gevd_pixel.h.


Typedef Documentation

typedef unsigned char byte

Definition at line 40 of file gevd_pixel.h.


Function Documentation

byte& bytePixel ( gevd_bufferxy buf,
int  x,
int  y 
) [inline]

Get reference to pixel as a byte/char, unsigned/signed char (8-bit) number, at indexes (x, y) in buf.

This function is used to get and set pixel on non-const gevd_bufferxy.

Definition at line 55 of file gevd_pixel.h.

const byte& bytePixel ( const gevd_bufferxy buf,
int  x,
int  y 
) [inline]

Get reference to pixel as a byte, at indexes (x, y).

Definition at line 106 of file gevd_pixel.h.

char& charPixel ( gevd_bufferxy buf,
int  x,
int  y 
) [inline]

Get reference to pixel as a byte/char, unsigned/signed char (8-bit) number, at indexes (x, y) in buf.

This function is used to get and set pixel on non-const gevd_bufferxy.

Definition at line 64 of file gevd_pixel.h.

const char& charPixel ( const gevd_bufferxy buf,
int  x,
int  y 
) [inline]

Get reference to pixel as a char, at indexes (x, y).

Definition at line 115 of file gevd_pixel.h.

float& floatPixel ( gevd_bufferxy buf,
int  x,
int  y 
) [inline]

Get reference to pixel as a float number, at indexes (x, y) in buf.

float is generally used to avoid overflow and unnecessary conversion between float/double for math computation and byte/short for storage.

Definition at line 90 of file gevd_pixel.h.

const float& floatPixel ( const gevd_bufferxy buf,
int  x,
int  y 
) [inline]

Get reference to pixel as a float, at indexes (x, y).

Definition at line 139 of file gevd_pixel.h.

void*& ptrPixel ( gevd_bufferxy buf,
int  x,
int  y 
) [inline]

Get reference to pixel as a pointer, at indexes (x, y).

Definition at line 98 of file gevd_pixel.h.

void* const& ptrPixel ( const gevd_bufferxy buf,
int  x,
int  y 
) [inline]

Get const reference to pixel at indexes (x, y).

This function is used to get pixel on const gevd_bufferxy, as a const reference to a byte/char/short/float/void*.

Definition at line 149 of file gevd_pixel.h.

short& shortPixel ( gevd_bufferxy buf,
int  x,
int  y 
) [inline]

Get reference to pixel as a short (16-bit) number, at indexes (x, y) in buf.

Definition at line 72 of file gevd_pixel.h.

const short& shortPixel ( const gevd_bufferxy buf,
int  x,
int  y 
) [inline]

Get reference to pixel as a short, at indexes (x, y).

Definition at line 123 of file gevd_pixel.h.

unsigned short& ushortPixel ( gevd_bufferxy buf,
int  x,
int  y 
) [inline]

Get reference to pixel as an unsigned short (16-bit) number, at indices (x, y) in buf.

Definition at line 80 of file gevd_pixel.h.

const unsigned short& ushortPixel ( const gevd_bufferxy buf,
int  x,
int  y 
) [inline]

Get reference to pixel as an unsigned short, at indices (x, y).

Definition at line 131 of file gevd_pixel.h.


Variable Documentation

const int bits_per_byte = sizeof(byte) * 8

Definition at line 45 of file gevd_pixel.h.

const int bits_per_char = sizeof(char) * 8

Definition at line 44 of file gevd_pixel.h.

const int bits_per_float = sizeof(float) * 8

Definition at line 42 of file gevd_pixel.h.

const int bits_per_ptr = sizeof(void*) * 8

Definition at line 41 of file gevd_pixel.h.

const int bits_per_short = sizeof(short) * 8

Definition at line 43 of file gevd_pixel.h.