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

Access Whole Channels of an Image
[Image Package]


Enumerations

enum  Gan_ImageChannelType {
  GAN_INTENSITY_CHANNEL, GAN_RED_CHANNEL, GAN_GREEN_CHANNEL, GAN_BLUE_CHANNEL,
  GAN_ALPHA_CHANNEL, GAN_X_CHANNEL, GAN_Y_CHANNEL, GAN_Z_CHANNEL,
  GAN_ALL_COLOUR_CHANNELS, GAN_ALL_CHANNELS
}
 Image channel types for extracting individual channels. More...

Functions

Gan_Imagegan_image_extract_channel_q (const Gan_Image *source, Gan_ImageChannelType channel, unsigned r0, unsigned c0, unsigned height, unsigned width, Gan_Image *dest)
 Extracts a specific channel from part of an image.
Gan_Bool gan_image_insert_channel (const Gan_Image *source, Gan_ImageChannelType schannel, Gan_Image *dest, Gan_ImageChannelType dchannel)
 Inserts a specific channel from one image into another.
Gan_Bool gan_image_fill_channel_const (Gan_Image *image, Gan_ImageChannelType channel, Gan_Pixel *pixel)
 Sets a single channel of an image to a constant value.
Gan_Bool gan_image_get_minimum_channel_value (Gan_Image *image, Gan_Image *mask, Gan_ImageChannelType channel, Gan_Pixel *minval)
 Finds the minimum value in the specified channel of an image.
Gan_Bool gan_image_get_maximum_channel_value (Gan_Image *image, Gan_Image *mask, Gan_ImageChannelType channel, Gan_Pixel *maxval)
 Finds the maximum value in the specified channel of an image.
Gan_Imagegan_image_threshold_channel_q (const Gan_Image *source, const Gan_Image *mask, Gan_ImageChannelType channel, float threshold, Gan_Image *dest)
 Thresholds a channel of an image.
Gan_Imagegan_image_extract_channel_s (const Gan_Image *source, Gan_ImageChannelType channel, unsigned r0, unsigned c0, unsigned height, unsigned width)
 Macro: Extracts a specific channel from part of an image.
Gan_Imagegan_image_fill_channel_zero (Gan_Image *image, Gan_ImageChannelType channel)
 Macro: Sets a single channel of an image to zero.
Gan_Imagegan_image_threshold_channel_s (const Gan_Image *source, const Gan_Image *mask, Gan_ImageChannelType channel, float threshold)
 Macro: Thresholds a channel of an image.
Gan_Bool gan_image_has_alpha_channel (const Gan_Image *img)
 Returns value indicating whether an image has an alpha channel.

Enumeration Type Documentation

enum Gan_ImageChannelType
 

Image channel types for extracting individual channels.

Enumeration values:
GAN_INTENSITY_CHANNEL  for grey-level/alpha images
GAN_RED_CHANNEL  for RGB and RGB/alpha images
GAN_ALPHA_CHANNEL  for grey-level/alpha and RGB/alpha images
GAN_X_CHANNEL  for 2D and 3D vector field images
GAN_Y_CHANNEL  likewise
GAN_Z_CHANNEL  for 3D vector field images
GAN_ALL_COLOUR_CHANNELS  all colour channels, e.g. R,G,B but not A
GAN_ALL_CHANNELS  all channels


Function Documentation

Gan_Image * gan_image_extract_channel_q const Gan_Image source,
Gan_ImageChannelType  channel,
unsigned  r0,
unsigned  c0,
unsigned  height,
unsigned  width,
Gan_Image dest
 

Extracts a specific channel from part of an image.

Parameters:
source The input image
channel The channel to extract from the image
r0 Vertical offset of start of region
c0 Horizontal offset of start of region
height Height of region in pixels
width Width of region in pixels
dest The destination image
Returns:
A pointer to the extracted image, or NULL on failure.
Extracts a specific channel in a sub-part of an image,

See also:
gan_image_extract_channel_s().

Gan_Image* gan_image_extract_channel_s const Gan_Image source,
Gan_ImageChannelType  channel,
unsigned  r0,
unsigned  c0,
unsigned  height,
unsigned  width
 

Macro: Extracts a specific channel from part of an image.

Parameters:
source The input image
channel The channel to extract from the image
r0 Vertical offset of start of region
c0 Horizontal offset of start of region
height Height of region in pixels
width Width of region in pixels
Returns:
A pointer to the extracted image, or NULL on failure.
Extracts a specific channel in a sub-part of an image, This is a macro call to gan_image_extract_channel_q().

See also:
gan_image_extract_channel_q().

Gan_Bool gan_image_fill_channel_const Gan_Image image,
Gan_ImageChannelType  channel,
Gan_Pixel pixel
 

Sets a single channel of an image to a constant value.

Parameters:
image The input image
channel The channel to set to constant value
pixel Pointer to grey-level pixel value
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Sets a single channel of an image to a constant value. The channel should correspond to one of the available channels in the image. The type of the pixel structure should be the same as the image, and the format should be GAN_GREY_LEVEL_IMAGE. If pixel is passed as NULL, the channel is filled with zeros.

See also:
gan_image_fill_channel_zero().

Gan_Image* gan_image_fill_channel_zero Gan_Image image,
Gan_ImageChannelType  channel
 

Macro: Sets a single channel of an image to zero.

Parameters:
image The input image
channel The channel to set to zero
Returns:
GAN_TRUE on success, or GAN_FALSE on failure.
Sets a single channel of an image to zero. This is a macro call to gan_image_fill_channel_const().

See also:
gan_image_fill_channel_const().

Gan_Bool gan_image_get_maximum_channel_value Gan_Image image,
Gan_Image mask,
Gan_ImageChannelType  channel,
Gan_Pixel maxval
 

Finds the maximum value in the specified channel of an image.

Parameters:
image The input image
mask Only test pixels in this mask (may be NULL)
channel The channel to set to constant value
maxval Pointer to the result maximum pixel value
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Finds the maximum value in the specified channel of an image.

Gan_Bool gan_image_get_minimum_channel_value Gan_Image image,
Gan_Image mask,
Gan_ImageChannelType  channel,
Gan_Pixel minval
 

Finds the minimum value in the specified channel of an image.

Parameters:
image The input image
mask Only test pixels in this mask (may be NULL)
channel The channel to set to constant value
minval Pointer to the result minimum pixel value
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Finds the minimum value in the specified channel of an image.

Gan_Bool gan_image_has_alpha_channel const Gan_Image img  ) 
 

Returns value indicating whether an image has an alpha channel.

Parameters:
img Input image
Returns:
GAN_TRUE if the image has an alpha channel, GAN_FALSE if it doesn't

Gan_Bool gan_image_insert_channel const Gan_Image source,
Gan_ImageChannelType  schannel,
Gan_Image dest,
Gan_ImageChannelType  dchannel
 

Inserts a specific channel from one image into another.

Parameters:
source The input image
schannel The channel in the input image
dest The output image
dchannel The channel in the output image
Returns:
A pointer to the extracted image, or NULL on failure.
Extracts a specific channel in a sub-part of an image,

See also:
gan_image_extract_channel_s().

Gan_Image * gan_image_threshold_channel_q const Gan_Image source,
const Gan_Image mask,
Gan_ImageChannelType  channel,
float  threshold,
Gan_Image dest
 

Thresholds a channel of an image.

Parameters:
source The input image
mask Mask of pixels to test
channel The channel to extract from the image
threshold The threshold in the range [0..1]
dest Destination mask image
Thresholds a specific channel of an image and returns a mask of pixels above the threshold. If a mask is specified, all pixels in dest outside the mask are set to zero.

See also:
gan_image_threshold_channel_s().

Gan_Image* gan_image_threshold_channel_s const Gan_Image source,
const Gan_Image mask,
Gan_ImageChannelType  channel,
float  threshold
 

Macro: Thresholds a channel of an image.

Parameters:
source The input image
mask Mask of pixels to test
channel The channel to extract from the image
threshold The threshold in the range [0..1]
Thresholds a specific channel of an image and returns a mask of pixels above the threshold, If a mask is specified, all pixels in dest outside the mask are set to zero.

This is a macro call to gan_image_threshold_channel_q().

See also:
gan_image_threshold_channel_q().


Generated on Fri Mar 17 12:45:01 2006 by  doxygen 1.3.9.1