Main Page | Modules | Alphabetical List | Class List | Directories | Class Members

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_NULL_INPUT if (one of) the input pointer(s) is NULL
  • CPL_ERROR_ACCESS_OUT_OF_RANGE if the specified position is out of the image

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:
  • CPL_ERROR_NULL_INPUT if (one of) the input pointer(s) is NULL

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:
  • CPL_ERROR_NULL_INPUT if (one of) the input pointer(s) is NULL

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_NULL_INPUT if (one of) the input pointer(s) is NULL
  • CPL_ERROR_ACCESS_OUT_OF_RANGE if the specified position is out of the image

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_NULL_INPUT if (one of) the input pointer(s) is NULL
  • CPL_ERROR_ACCESS_OUT_OF_RANGE if the specified position is out of the 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.

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. If the passed map is NULL, the input im image is unchanged.

Possible _cpl_error_code_ set in this function:

  • CPL_ERROR_NULL_INPUT if the input image is NULL
  • CPL_ERROR_ILLEGAL_INPUT if the image and the map have different sizes


Generated on Mon Sep 26 14:38:17 2005 for Common Pipeline Library Reference Manual by  doxygen 1.4.1