Bad pixels map handling functions


Functions

int cpl_image_is_rejected (const cpl_image *im, int x, int y)
 Test if a pixel is good or bad.
int cpl_image_count_rejected (const cpl_image *im)
 Count the number of bad pixels declared in an image.
cpl_error_code cpl_image_reject (cpl_image *im, int x, int y)
 Set a pixel as bad in an image.
cpl_error_code cpl_image_accept (cpl_image *im, int x, int y)
 Set a pixel as good in an image.
cpl_error_code cpl_image_accept_all (cpl_image *im)
 Set all pixels in the image as good.
cpl_error_code cpl_image_reject_from_mask (cpl_image *im, const cpl_mask *map)
 Set the bad pixels in an image as defined in a mask.

Detailed Description

This module provides functions to handle bad pixels maps stored in images.

The provided functions allow the user to set or reset the bad pixels in an image, or to get various informations on those bad pixels.

Synopsis:
   #include "cpl_image_bpm.h"

Function Documentation

cpl_error_code cpl_image_accept ( cpl_image *  im,
int  x,
int  y 
)

Set a pixel as good in an image.

Parameters:
im the input image
x the x pixel position in the image (first pixel is 1)
y the y pixel position in the image (first pixel is 1)
Returns:
the _cpl_error_code_ or CPL_ERROR_NONE
Possible _cpl_error_code_ set in this function:

cpl_error_code cpl_image_accept_all ( cpl_image *  im  ) 

Set all pixels in the image as good.

Parameters:
im the input image
Returns:
the _cpl_error_code_ or CPL_ERROR_NONE
Possible _cpl_error_code_ set in this function:

int cpl_image_count_rejected ( const cpl_image *  im  ) 

Count the number of bad pixels declared in an image.

Parameters:
im the input image
Returns:
the number of bad pixels or -1 if the input image is NULL
Possible _cpl_error_code_ set in this function:

int cpl_image_is_rejected ( const cpl_image *  im,
int  x,
int  y 
)

Test if a pixel is good or bad.

Parameters:
im the input image
x the x pixel position in the image (first pixel is 1)
y the y pixel position in the image (first pixel is 1)
Returns:
1 if the pixel is bad, 0 if the pixel is good, negative on error.
Possible _cpl_error_code_ set in this function:

cpl_error_code cpl_image_reject ( cpl_image *  im,
int  x,
int  y 
)

Set a pixel as bad in an image.

Parameters:
im the input image
x the x pixel position in the image (first pixel is 1)
y the y pixel position in the image (first pixel is 1)
Returns:
the _cpl_error_code_ or CPL_ERROR_NONE
Possible _cpl_error_code_ set in this function:

cpl_error_code cpl_image_reject_from_mask ( cpl_image *  im,
const cpl_mask *  map 
)

Set the bad pixels in an image as defined in a mask.

Parameters:
im the input image
map the mask defining the bad pixels
Returns:
the _cpl_error_code_ or CPL_ERROR_NONE
The bad pixel map contained in the image is overwritten/lost.

Possible _cpl_error_code_ set in this function:


Generated on Thu Nov 8 15:27:57 2007 for Common Pipeline Library Reference Manual by  doxygen 1.5.1