Main Page | Modules | Class List | File List | Class Members | File Members

pixel.h File Reference

#include <gandalf/common/misc_defs.h>
#include <gandalf/common/bit_array.h>
#include <gandalf/linalg/2vector.h>
#include <gandalf/linalg/2vectorf.h>
#include <gandalf/linalg/3vector.h>
#include <gandalf/linalg/3vectorf.h>

Go to the source code of this file.

Classes

struct  Gan_GLAPixel_uc
 Structure defining grey-level unsigned character pixel with alpha channel. More...
struct  Gan_GLAPixel_s
 Structure defining grey-level short integer pixel with alpha channel. More...
struct  Gan_GLAPixel_us
 Structure defining grey-level unsigned short pixel with alpha channel. More...
struct  Gan_GLAPixel_i
 Structure defining grey-level signed integer pixel with alpha channel. More...
struct  Gan_GLAPixel_ui
 Structure defining grey-level unsigned integer pixel with alpha channel. More...
struct  Gan_GLAPixel_f
 Structure defining grey-level single precision floating point pixel with alpha channel. More...
struct  Gan_GLAPixel_d
 Structure defining grey-level double precision floating point pixel with alpha channel. More...
struct  Gan_RGBPixel_uc
 Structure defining RGB colour unsigned character pixel. More...
struct  Gan_RGBPixel_s
 Structure defining RGB colour signed short integer pixel. More...
struct  Gan_RGBPixel_us
 Structure defining RGB colour unsigned short integer pixel. More...
struct  Gan_RGBPixel_i
 Structure defining RGB colour signed integer pixel. More...
struct  Gan_RGBPixel_ui
 Structure defining RGB colour unsigned integer pixel. More...
struct  Gan_RGBPixel_f
 Structure defining RGB colour singe precision floating point pixel. More...
struct  Gan_RGBPixel_d
 Structure defining RGB colour double precision floating point pixel. More...
struct  Gan_RGBAPixel_uc
 Structure defining RGB unsigned character pixel with alpha channel. More...
struct  Gan_RGBAPixel_s
 Structure defining RGB signed short integer pixel with alpha channel. More...
struct  Gan_RGBAPixel_us
 Structure defining RGB unsigned short integer pixel with alpha channel. More...
struct  Gan_RGBAPixel_i
 Structure defining RGB signed integer pixel with alpha channel. More...
struct  Gan_RGBAPixel_ui
 Structure defining RGB unsigned integer pixel with alpha channel. More...
struct  Gan_RGBAPixel_f
 Structure defining RGB single precision floating point pixel with alpha channel. More...
struct  Gan_RGBAPixel_d
 Structure defining RGB double precision floating point pixel with alpha channel. More...
struct  Gan_RGBXPixel_ui8
 Structure defining padded 8-bit RGBX pixel. More...
struct  Gan_RGBXPixel_ui10
 Structure defining 10-bit RGBX pixel. More...
struct  Gan_RGBASPixel_ui10
 Structure defining 10-bit RGB pixel with 2-bit alpha channel. More...
struct  Gan_RGBAPixel_ui12
 Structure defining 12-bit packed RGBA. More...
struct  Gan_YUVX444Pixel_ui8
 Structure defining YUV 8-bit 4-4-4 pixel padded to a word boundary. More...
struct  Gan_YUVA444Pixel_ui8
 Structure defining YUVA 8-bit 4-4-4 pixel. More...
struct  Gan_YUV422Pixel_ui8
 Structure defining UYVY 8-bit 4-2-2 pixel. More...
struct  Gan_YXPixel_ui10
 Structure defining YX 10-bit luminance with 6-bit padding. More...
struct  Gan_YXPixel_ui12
 Structure defining YX 12-bit luminance with 4-bit padding. More...
struct  Gan_Pixel
 Structure definition for image pixel of any format or type. More...

Typedefs

typedef Gan_GLAPixel_uc Gan_GLAPixel_uc
 Structure defining grey-level unsigned character pixel with alpha channel.
typedef Gan_GLAPixel_s Gan_GLAPixel_s
 Structure defining grey-level short integer pixel with alpha channel.
typedef Gan_GLAPixel_us Gan_GLAPixel_us
 Structure defining grey-level unsigned short pixel with alpha channel.
typedef Gan_GLAPixel_i Gan_GLAPixel_i
 Structure defining grey-level signed integer pixel with alpha channel.
typedef Gan_GLAPixel_ui Gan_GLAPixel_ui
 Structure defining grey-level unsigned integer pixel with alpha channel.
typedef Gan_GLAPixel_f Gan_GLAPixel_f
 Structure defining grey-level single precision floating point pixel with alpha channel.
typedef Gan_GLAPixel_d Gan_GLAPixel_d
 Structure defining grey-level double precision floating point pixel with alpha channel.
typedef Gan_RGBPixel_uc Gan_RGBPixel_uc
 Structure defining RGB colour unsigned character pixel.
typedef Gan_RGBPixel_s Gan_RGBPixel_s
 Structure defining RGB colour signed short integer pixel.
typedef Gan_RGBPixel_us Gan_RGBPixel_us
 Structure defining RGB colour unsigned short integer pixel.
typedef Gan_RGBPixel_i Gan_RGBPixel_i
 Structure defining RGB colour signed integer pixel.
typedef Gan_RGBPixel_ui Gan_RGBPixel_ui
 Structure defining RGB colour unsigned integer pixel.
typedef Gan_RGBPixel_f Gan_RGBPixel_f
 Structure defining RGB colour singe precision floating point pixel.
typedef Gan_RGBPixel_d Gan_RGBPixel_d
 Structure defining RGB colour double precision floating point pixel.
typedef Gan_RGBAPixel_uc Gan_RGBAPixel_uc
 Structure defining RGB unsigned character pixel with alpha channel.
typedef Gan_RGBAPixel_s Gan_RGBAPixel_s
 Structure defining RGB signed short integer pixel with alpha channel.
typedef Gan_RGBAPixel_us Gan_RGBAPixel_us
 Structure defining RGB unsigned short integer pixel with alpha channel.
typedef Gan_RGBAPixel_i Gan_RGBAPixel_i
 Structure defining RGB signed integer pixel with alpha channel.
typedef Gan_RGBAPixel_ui Gan_RGBAPixel_ui
 Structure defining RGB unsigned integer pixel with alpha channel.
typedef Gan_RGBAPixel_f Gan_RGBAPixel_f
 Structure defining RGB single precision floating point pixel with alpha channel.
typedef Gan_RGBAPixel_d Gan_RGBAPixel_d
 Structure defining RGB double precision floating point pixel with alpha channel.
typedef Gan_RGBXPixel_ui8 Gan_RGBXPixel_ui8
 Structure defining padded 8-bit RGBX pixel.
typedef Gan_RGBXPixel_ui10 Gan_RGBXPixel_ui10
 Structure defining 10-bit RGBX pixel.
typedef Gan_RGBASPixel_ui10 Gan_RGBASPixel_ui10
 Structure defining 10-bit RGB pixel with 2-bit alpha channel.
typedef Gan_RGBAPixel_ui12 Gan_RGBAPixel_ui12
 Structure defining 12-bit packed RGBA.
typedef Gan_YUVX444Pixel_ui8 Gan_YUVX444Pixel_ui8
 Structure defining YUV 8-bit 4-4-4 pixel padded to a word boundary.
typedef Gan_YUVA444Pixel_ui8 Gan_YUVA444Pixel_ui8
 Structure defining YUVA 8-bit 4-4-4 pixel.
typedef Gan_YUV422Pixel_ui8 Gan_YUV422Pixel_ui8
 Structure defining UYVY 8-bit 4-2-2 pixel.
typedef Gan_YXPixel_ui10 Gan_YXPixel_ui10
 Structure defining YX 10-bit luminance with 6-bit padding.
typedef Gan_YXPixel_ui12 Gan_YXPixel_ui12
 Structure defining YX 12-bit luminance with 4-bit padding.
typedef Gan_Pixel Gan_Pixel
 Structure definition for image pixel of any format or type.

Enumerations

enum  Gan_ImageFormat {
  GAN_GREY_LEVEL_IMAGE, GAN_GREY_LEVEL_ALPHA_IMAGE, GAN_RGB_COLOUR_IMAGE, GAN_RGB_COLOUR_ALPHA_IMAGE,
  GAN_VECTOR_FIELD_2D, GAN_VECTOR_FIELD_3D, GAN_RGBX, GAN_RGBAS,
  GAN_YUVX444, GAN_YUVA444, GAN_YUV422, GAN_UNDEFINED_IMAGE_FORMAT
}
 Different formats of image pixel. More...

Functions

gan_uint8 gan_pixel_rgbui8_to_yui8 (const Gan_RGBPixel_ui8 *rgb)
 Macro: Convert RGB 8-bit pixel to grey-level 8-bit pixel.
gan_uint16 gan_pixel_rgbui8_to_yui16 (const Gan_RGBPixel_ui8 *rgb)
 Macro: Convert RGB 8-bit pixel to grey-level 16-bit pixel.
gan_uint32 gan_pixel_rgbui8_to_yui32 (const Gan_RGBPixel_ui8 *rgb)
 Macro: Convert RGB 8-bit pixel to grey-level 32-bit pixel.
gan_uint8 gan_pixel_rgbui16_to_yui8 (const Gan_RGBPixel_ui16 *rgb)
 Macro: Convert RGB 16-bit pixel to grey-level 8-bit pixel.
gan_uint16 gan_pixel_rgbui16_to_yui16 (const Gan_RGBPixel_ui16 *rgb)
 Macro: Convert RGB 16-bit pixel to grey-level 16-bit pixel.
gan_float32 gan_pixel_rgbui32_to_yf32 (const Gan_RGBPixel_ui32 *rgb)
 Macro: Convert RGB 32-bit pixel to grey-level 32-bit float pixel.
gan_float32 gan_pixel_rgbf32_to_yf32 (const Gan_RGBPixel_f32 *rgb)
 Macro: Convert RGB 32-bit float pixel to grey-level 32-bit float pixel.
gan_float64 gan_pixel_rgbf64_to_yf64 (const Gan_RGBPixel_f64 *rgb)
 Macro: Convert RGB 64-bit float pixel to grey-level 64-bit float pixel.
gan_uint8 gan_pixel_rgbaui8_to_yui8 (const Gan_RGBAPixel_ui8 *rgba)
 Macro: Convert RGBA 8-bit pixel to grey-level 8-bit pixel.
gan_uint16 gan_pixel_rgbaui8_to_yui16 (const Gan_RGBAPixel_ui8 *rgba)
 Macro: Convert RGBA 8-bit pixel to grey-level 16-bit pixel.
gan_uint32 gan_pixel_rgbaui8_to_yui32 (const Gan_RGBAPixel_ui8 *rgba)
 Macro: Convert RGBA 8-bit pixel to grey-level 32-bit pixel.
gan_uint8 gan_pixel_rgbaui16_to_yui8 (const Gan_RGBAPixel_ui16 *rgba)
 Macro: Convert RGBA 16-bit pixel to grey-level 8-bit pixel.
gan_uint16 gan_pixel_rgbaui16_to_yui16 (const Gan_RGBAPixel_ui16 *rgba)
 Macro: Convert RGBA 16-bit pixel to grey-level 16-bit pixel.
gan_float32 gan_pixel_rgbaui32_to_yf32 (const Gan_RGBAPixel_ui32 *rgba)
 Macro: Convert RGBA 32-bit pixel to grey-level 32-bit float pixel.
gan_float32 gan_pixel_rgbaf32_to_yf32 (const Gan_RGBAPixel_f32 *rgba)
 Macro: Convert RGBA 32-bit float pixel to grey-level 32-bit float pixel.
gan_float64 gan_pixel_rgbaf64_to_yf64 (const Gan_RGBAPixel_f64 *rgba)
 Macro: Convert RGBA 64-bit float pixel to grey-level 64-bit float pixel.
unsigned char gan_pixel_us_to_uc (unsigned short x)
 Macro: Convert a pixel field from unsigned short to unsigned char type.
gan_uint8 gan_pixel_ui16_to_ui8 (gan_uint16 x)
 Macro: Convert a pixel field from unsigned 16-bit to unsigned 8-bit type.
unsigned char gan_pixel_ui_to_uc (unsigned x)
 Macro: Convert a pixel field from unsigned int to unsigned char type.
gan_uint8 gan_pixel_ui32_to_ui8 (gan_uint32 x)
 Macro: Convert a pixel field from 32-bit unsigned integer to 8-bit unsigned integer type.
unsigned char gan_pixel_f_to_uc (float x)
 Macro: Convert a pixel field from float to unsigned char type.
gan_uint8 gan_pixel_f32_to_ui8 (gan_float32 x)
 Macro: Convert a pixel field from 32-bit float to 8-bit unsigned integer type.
unsigned char gan_pixel_d_to_uc (double x)
 Macro: Convert a pixel field from double to unsigned char type.
gan_uint8 gan_pixel_f64_to_ui8 (gan_float64 x)
 Macro: Convert a pixel field from 64-bit float to 8-bit unsigned integer type.
unsigned short gan_pixel_uc_to_us (unsigned char x)
 Macro: Convert a pixel field from unsigned char to unsigned short type.
gan_uint16 gan_pixel_ui8_to_ui16 (gan_uint8 x)
 Macro: Convert a pixel field from 8-bit unsigned integer to 16-bit unsigned integer type.
unsigned short gan_pixel_ui_to_us (unsigned x)
 Macro: Convert a pixel field from unsigned int to unsigned short type.
gan_uint16 gan_pixel_ui32_to_ui16 (gan_uint32 x)
 Macro: Convert a pixel field from 32-bit unsigned integer to 16-bit unsigned integer type.
short gan_pixel_i_to_s (int x)
 Macro: Convert a pixel field from int to short type.
gan_int16 gan_pixel_i32_to_i16 (gan_int32 x)
 Macro: Convert a pixel field from 32-bit to 16-bit signed integer type.
unsigned short gan_pixel_f_to_us (float x)
 Macro: Convert a pixel field from float to unsigned short type.
gan_int16 gan_pixel_f32_to_ui16 (gan_float32 x)
 Macro: Convert a pixel field from 32-bit float to 16-bit unsigned integer type.
unsigned short gan_pixel_d_to_us (double x)
 Macro: Convert a pixel field from double to unsigned short type.
gan_int16 gan_pixel_f64_to_ui16 (gan_float64 x)
 Macro: Convert a pixel field from 64-bit float to 16-bit unsigned integer type.
unsigned int gan_pixel_uc_to_ui (unsigned char x)
 Macro: Convert a pixel field from unsigned char to unsigned int type.
gan_uint32 gan_pixel_ui8_to_ui32 (gan_uint8 x)
 Macro: Convert a pixel field from 8-bit unsigned integer to 32-bit unsigned integer type.
unsigned int gan_pixel_us_to_ui (unsigned short x)
 Macro: Convert a pixel field from unsigned short to unsigned int type.
gan_uint32 gan_pixel_ui16_to_ui32 (gan_uint16 x)
 Macro: Convert a pixel field from 16-bit unsigned integer to 32-bit unsigned integer type.
int gan_pixel_s_to_i (short x)
 Macro: Convert a pixel field from short to int type.
gan_int32 gan_pixel_i16_to_i32 (gan_int16 x)
 Macro: Convert a pixel field from 16-bit to 32-bit signed integer type.
unsigned int gan_pixel_f_to_ui (float x)
 Macro: Convert a pixel field from float to unsigned int type.
gan_uint32 gan_pixel_f32_to_ui32 (gan_float32 x)
 Macro: Convert a pixel field from 32-bit float to 32-bit unsigned integer type.
unsigned int gan_pixel_d_to_ui (double x)
 Macro: Convert a pixel field from double to unsigned int type.
gan_uint32 gan_pixel_f64_to_ui32 (gan_float64 x)
 Macro: Convert a pixel field from 64-bit float to 32-bit unsigned integer type.
float gan_pixel_uc_to_f (unsigned char x)
gan_float32 gan_pixel_ui8_to_f32 (gan_uint8 x)
float gan_pixel_us_to_f (unsigned short x)
 Macro: Convert a pixel field from unsigned short to float type.
gan_float32 gan_pixel_ui16_to_f32 (gan_uint16 x)
 Macro: Convert a pixel field from 16-bit unsigned integer to 32-bit float type.
float gan_pixel_ui_to_f (unsigned int x)
 Macro: Convert a pixel field from unsigned int to float type.
gan_float32 gan_pixel_ui32_to_f32 (gan_uint32 x)
 Macro: Convert a pixel field from 32-bit unsigned integer to 32-bit float type.
double gan_pixel_uc_to_d (unsigned char x)
 Macro: Convert a pixel field from unsigned char to double type.
gan_float64 gan_pixel_ui8_to_f64 (gan_uint8 x)
 Macro: Convert a pixel field from 8-bit unsigned integer to 64-bit float type.
double gan_pixel_us_to_d (unsigned short x)
 Macro: Convert a pixel field from unsigned short to double type.
gan_float64 gan_pixel_ui16_to_f64 (gan_uint16 x)
 Macro: Convert a pixel field from 16-bit unsigned integer to 64-bit float type.
double gan_pixel_ui_to_d (unsigned int x)
 Macro: Convert a pixel field from unsigned int to double type.
gan_float64 gan_pixel_ui32_to_f64 (gan_uint32 x)
 Macro: Convert a pixel field from 32-bit unsigned integer to 64-bit float type.
int gan_pixel_f_to_i (float x)
 Macro: Convert a pixel field from float to int type.
gan_int32 gan_pixel_f32_to_i32 (gan_float32 x)
 Macro: Convert a pixel field from 32-bit float to 32-bit signed integer type.
int gan_pixel_d_to_i (double x)
 Macro: Convert a pixel field from double to int type.
gan_int32 gan_pixel_f64_to_i32 (gan_float64 x)
 Macro: Convert a pixel field from 64-bit float to 32-bit signed integer type.
short gan_pixel_f_to_s (float x)
 Macro: Convert a pixel field from float to short type.
gan_int16 gan_pixel_f32_to_i16 (gan_float32 x)
 Macro: Convert a pixel field from 32-bit float to 16-bit signed integer type.
short gan_pixel_d_to_s (double x)
 Macro: Convert a pixel field from double to short type.
gan_int16 gan_pixel_f64_to_i16 (gan_float64 x)
 Macro: Convert a pixel field from 64-bit float to 16-bit signed integer type.
float gan_pixel_s_to_f (short x)
 Macro: Convert a pixel field from short to float type.
gan_float32 gan_pixel_i16_to_f32 (gan_int16 x)
 Macro: Convert a pixel field from 16-bit signed integer to 32-bit float type.
double gan_pixel_s_to_d (short x)
 Macro: Convert a pixel field from short to double type.
gan_float64 gan_pixel_i16_to_f64 (gan_int16 x)
 Macro: Convert a pixel field from 16-bit signed integer to 64-bit float type.
float gan_pixel_i_to_f (int x)
 Macro: Convert a pixel field from int to float type.
gan_float32 gan_pixel_i32_to_f32 (gan_int32 x)
 Macro: Convert a pixel field from 32-bit signed integer to 32-bit float type.
double gan_pixel_i_to_d (int x)
 Macro: Convert a pixel field from int to double type.
gan_float64 gan_pixel_i32_to_f64 (gan_int32 x)
 Macro: Convert a pixel field from 32-bit signed integer to 64-bit float type.
Gan_Bool gan_image_convert_pixel_q (Gan_Pixel *inpix, Gan_ImageFormat format, Gan_Type type, Gan_Pixel *outpix)
 Macro: Convert pixel.
Gan_Bool gan_image_convert_pixel_i (Gan_Pixel *pix, Gan_ImageFormat format, Gan_Type type)
 Macro: Convert pixel in-place.
Gan_Bool gan_image_offset_pixel_i (Gan_Pixel *pixel, double offset)
 Macro: Offset pixel in-place.
Gan_Bool gan_image_scale_pixel_i (Gan_Pixel *pixel, double scale)
 Macro: Scale pixel in-place.
Gan_Bool gan_image_divide_pixel_i (Gan_Pixel *pixel, double scale)
 Macro: Divide pixel by scalar pixel in-place.

Variables

float lookup_table_8bit []


Detailed Description

Module: Image pixel definitions and functions

Part of: Gandalf Library

Version:
1.55
Date:
2006/03/15 16:18:23
Author:
pm
Copyright: (c) 2000 Imagineer Software Limited
Generated on Fri Mar 17 12:44:52 2006 by  doxygen 1.3.9.1