Bad pixels map handling functions


Functions

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.
int cpl_image_count_rejected (const cpl_image *im)
 Count the number of bad pixels declared in an image.
int cpl_image_is_rejected (const cpl_image *im, int x, int y)
 Test if a pixel is good or bad.
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_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.

In the bad pixel map CPL_BINARY_1 is used for bad pixels and CPL_BINARY_0 for good ones.

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
If the input image has a bad pixel map prior to the call, it is overwritten.

Possible _cpl_error_code_ set in this function:


Generated on Wed Mar 18 09:40:12 2009 for Common Pipeline Library Reference Manual by  doxygen 1.4.7