High-Level Data Reduction Library: Imagelist object

High-Level Data Reduction Library 1.6.0 High-Level data reduction routines for ESO pipelines

Loading...
Searching...
No Matches
Data Structures | Typedefs | Enumerations | Functions
Imagelist object

## Data Structures
union | hdrl_func_ptr
struct | hdrl_imagelist_row_slices_iter

## Typedefs
typedef cpl_error_code(* | hdrl_f_image) (hdrl_image *, const hdrl_image *)
typedef cpl_error_code(* | hdrl_f_scalar) (hdrl_image *, hdrl_value)

## Enumerations
enum | hdrl_imagelist_basic_type { HDRL_IMLIST_BASIC_IMLIST = 0 , HDRL_IMLIST_BASIC_IMAGE , HDRL_IMLIST_BASIC_SCALAR }
| Define the kind of operation to apply. More...

## Functions
cpl_error_code | hdrl_imagelist_add_imagelist (hdrl_imagelist *himlist1, const hdrl_imagelist *himlist2)
| Add two image lists, the first one is replaced by the result.
cpl_error_code | hdrl_imagelist_sub_imagelist (hdrl_imagelist *himlist1, const hdrl_imagelist *himlist2)
| Subtract two image lists, the first one is replaced by the result.
cpl_error_code | hdrl_imagelist_mul_imagelist (hdrl_imagelist *himlist1, const hdrl_imagelist *himlist2)
| Multiply two image lists, the first one is replaced by the result.
cpl_error_code | hdrl_imagelist_div_imagelist (hdrl_imagelist *himlist1, const hdrl_imagelist *himlist2)
| Divide two image lists, the first one is replaced by the result.
cpl_error_code | hdrl_imagelist_add_image (hdrl_imagelist *himlist, const hdrl_image *himg)
| Add an image to an image list.
cpl_error_code | hdrl_imagelist_sub_image (hdrl_imagelist *himlist, const hdrl_image *himg)
| Subtract an image from an image list.
cpl_error_code | hdrl_imagelist_mul_image (hdrl_imagelist *himlist, const hdrl_image *himg)
| Multiply an image by an image list.
cpl_error_code | hdrl_imagelist_div_image (hdrl_imagelist *himlist, const hdrl_image *himg)
| Divide an image from an image list.
cpl_error_code | hdrl_imagelist_add_scalar (hdrl_imagelist *himlist, hdrl_value value)
| Elementwise addition of a scalar to each image in the himlist.
cpl_error_code | hdrl_imagelist_sub_scalar (hdrl_imagelist *himlist, hdrl_value value)
| Elementwise subtraction of a scalar to each image in the himlist.
cpl_error_code | hdrl_imagelist_mul_scalar (hdrl_imagelist *himlist, hdrl_value value)
| Elementwise multiplication of a scalar to each image in the himlist.
cpl_error_code | hdrl_imagelist_div_scalar (hdrl_imagelist *himlist, hdrl_value value)
| Elementwise division by a scalar to each image in the himlist.
cpl_error_code | hdrl_imagelist_pow_scalar (hdrl_imagelist *himlist, hdrl_value exponent)
| Compute the elementwise power of each image in the himlist.
cpl_error_code | hdrl_imagelist_collapse (const hdrl_imagelist *himlist, const hdrl_parameter *param, hdrl_image **out, cpl_image **contrib)
| collapsing of image list
cpl_error_code | hdrl_imagelist_collapse_mean (const hdrl_imagelist *himlist, hdrl_image **out, cpl_image **contrib)
| Mean collapsing of image list.
cpl_error_code | hdrl_imagelist_collapse_weighted_mean (const hdrl_imagelist *himlist, hdrl_image **out, cpl_image **contrib)
| Weighted Mean collapsing of image list.
cpl_error_code | hdrl_imagelist_collapse_median (const hdrl_imagelist *himlist, hdrl_image **out, cpl_image **contrib)
| Median collapsing of image list.
cpl_error_code | hdrl_imagelist_collapse_sigclip (const hdrl_imagelist *himlist, double kappa_low, double kappa_high, int niter, hdrl_image **out, cpl_image **contrib, cpl_image **reject_low, cpl_image **reject_high)
| Sigma-clipped collapsing of image list.
cpl_error_code | hdrl_imagelist_collapse_minmax (const hdrl_imagelist *himlist, double nlow, double nhigh, hdrl_image **out, cpl_image **contrib, cpl_image **reject_low, cpl_image **reject_high)
| Minmax-clipped collapsing of image list.
cpl_error_code | hdrl_imagelist_collapse_mode (const hdrl_imagelist *himlist, double histo_min, double histo_max, double bin_size, hdrl_mode_type mode_method, cpl_size error_niter, hdrl_image **out, cpl_image **contrib)
| Mode collapsing of image list.
hdrl_imagelist * | hdrl_imagelist_new (void)
| Create an empty imagelist.
hdrl_imagelist * | hdrl_imagelist_create (cpl_imagelist *imlist, cpl_imagelist *errlist)
| Create an hdrl_imagelist out of 2 cpl_imagelist.
cpl_size | hdrl_imagelist_get_size (const hdrl_imagelist *himlist)
| Get the number of images in the imagelist.
cpl_size | hdrl_imagelist_get_size_x (const hdrl_imagelist *himlist)
| Get number of colums of images in the imagelist.
cpl_size | hdrl_imagelist_get_size_y (const hdrl_imagelist *himlist)
| Get number of rows of images in the imagelist.
hdrl_image * | hdrl_imagelist_get (const hdrl_imagelist *himlist, cpl_size inum)
| Get an image from a list of images.
const hdrl_image * | hdrl_imagelist_get_const (const hdrl_imagelist *himlist, cpl_size inum)
| Get an image from a list of images.
cpl_error_code | hdrl_imagelist_set (hdrl_imagelist *himlist, hdrl_image *himg, cpl_size pos)
| Insert an image into an imagelist.
hdrl_image * | hdrl_imagelist_unset (hdrl_imagelist *himlist, cpl_size pos)
| Remove an image from an imagelist.
void | hdrl_imagelist_delete (hdrl_imagelist *himlist)
| Free all memory used by a hdrl_imagelist object including the images.
void | hdrl_imagelist_empty (hdrl_imagelist *himlist)
| Empty an imagelist and deallocate all its images.
hdrl_imagelist * | hdrl_imagelist_duplicate (const hdrl_imagelist *himlist)
| Duplicate an image list.
int | hdrl_imagelist_is_consistent (const hdrl_imagelist *himlist)
| Determine if an imagelist contains images of equal size and type.
cpl_error_code | hdrl_imagelist_dump_structure (const hdrl_imagelist *himlist, FILE *stream)
| Dump structural information of images in an imagelist.
cpl_error_code | hdrl_imagelist_dump_window (const hdrl_imagelist *himlist, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury, FILE *stream)
| Dump pixel values of images in a imagelist.
void | hdrl_imagelist_unwrap (hdrl_imagelist *himlist)
hdrl_il_rowsliceiter_data | hdrl_imagelist_iter_row_slices_get_data (const hdrl_iter *it)
hdrl_iter * | hdrl_imagelist_get_iter_row_slices (const hdrl_imagelist *hlist, cpl_size nrows, cpl_size overlap, hdrl_iter_flags flags)

## Detailed Description

hdrl_imagelist is similiar to cpl_imagelist but for hdrl_image. Its reduction methods (mean, median, ...) provide linear error propagation.

## Typedef Documentation

## ◆ hdrl_f_image

typedef cpl_error_code(* hdrl_f_image) (hdrl_image *, const hdrl_image *)

## ◆ hdrl_f_scalar

typedef cpl_error_code(* hdrl_f_scalar) (hdrl_image *, hdrl_value)

## Enumeration Type Documentation

## ◆ hdrl_imagelist_basic_type

enum hdrl_imagelist_basic_type

Define the kind of operation to apply.

Enumerator
HDRL_IMLIST_BASIC_IMLIST |
HDRL_IMLIST_BASIC_IMAGE |
HDRL_IMLIST_BASIC_SCALAR |

## Function Documentation

## ◆ hdrl_imagelist_add_image()

cpl_error_code hdrl_imagelist_add_image | ( | hdrl_imagelist * | himlist,
|  | const hdrl_image * | himg
| ) |  |

Add an image to an image list.

Parameters

  himlist | input image list (modified)
  himg | image to add

Returns
  the cpl_error_code or CPL_ERROR_NONE

See also
  hdrl_image_add_image()

The passed image is added to each image of the passed image list.

Possible cpl_error_code set in this function:

- CPL_ERROR_NULL_INPUT if an input pointer is NULL

## ◆ hdrl_imagelist_add_imagelist()

cpl_error_code hdrl_imagelist_add_imagelist | ( | hdrl_imagelist * | himlist1,
|  | const hdrl_imagelist * | himlist2
| ) |  |

Add two image lists, the first one is replaced by the result.

Parameters

  himlist1 | first input image list (modified)
  himlist2 | image list to add

Returns
  the cpl_error_code or CPL_ERROR_NONE

See also
  hdrl_image_add_image()

The two input lists must have the same size, the image number n in the list himlist2 is added to the image number n in the list himlist1.

Possible cpl_error_code set in this function:

- CPL_ERROR_NULL_INPUT if an input pointer is NULL
- CPL_ERROR_ILLEGAL_INPUT if the input images have different sizes

## ◆ hdrl_imagelist_add_scalar()

cpl_error_code hdrl_imagelist_add_scalar | ( | hdrl_imagelist * | himlist,
|  | hdrl_value | value
| ) |  |

Elementwise addition of a scalar to each image in the himlist.

Parameters

  himlist | Imagelist to be modified in place.
  value | Value to add to the images

Returns
  the cpl_error_code or CPL_ERROR_NONE

See also
  hdrl_image_add_scalar()

Possible cpl_error_code set in this function:

- CPL_ERROR_NULL_INPUT if an input pointer is NULL

## ◆ hdrl_imagelist_collapse()

cpl_error_code hdrl_imagelist_collapse | ( | const hdrl_imagelist * | himlist,
|  | const hdrl_parameter * | param,
|  | hdrl_image ** | out,
|  | cpl_image ** | contrib
| ) |  |

collapsing of image list

Parameters

  himlist | input image list
  param | collapse parameters defining the type of collapse
  out | output combined image pointer filled with pointer to allocated result object
  contrib | output contribution mask pointer filled with pointer to allocated result object

Returns
  CPL_ERROR_NONE or the relevant the cpl_error_code on error

See also
  hdrl_collapse_mean_parameter_create()

Collapse an imagelist according to the type of collapse parameter used as input. It only supports collapse methods with the two outputs, the combined image and the contribution map. For collapse functions with additional output the specialized collapse functions must be used.

Possible cpl_error_code set in this function:

- CPL_ERROR_NULL_INPUT if an input pointer is NULL
- CPL_ERROR_UNSUPPORTED_MODE parameter is not a know collapse parameter

## ◆ hdrl_imagelist_collapse_mean()

cpl_error_code hdrl_imagelist_collapse_mean | ( | const hdrl_imagelist * | himlist,
|  | hdrl_image ** | out,
|  | cpl_image ** | contrib
| ) |  |

Mean collapsing of image list.

Parameters

  himlist | input image list
  out | output combined image
  contrib | output contribution mask

Returns
  CPL_ERROR_NONE or the relevant the cpl_error_code on error

Possible cpl_error_code set in this function:

- CPL_ERROR_NULL_INPUT if an input pointer is NULL

## ◆ hdrl_imagelist_collapse_median()

cpl_error_code hdrl_imagelist_collapse_median | ( | const hdrl_imagelist * | himlist,
|  | hdrl_image ** | out,
|  | cpl_image ** | contrib
| ) |  |

Median collapsing of image list.

Parameters

  himlist | input image list
  out | output combined image
  contrib | output contribution mask

Returns
  CPL_ERROR_NONE or the relevant the cpl_error_code on error

Possible cpl_error_code set in this function:

- CPL_ERROR_NULL_INPUT if an input pointer is NULL

## ◆ hdrl_imagelist_collapse_minmax()

cpl_error_code hdrl_imagelist_collapse_minmax | ( | const hdrl_imagelist * | himlist,
|  | double | nlow,
|  | double | nhigh,
|  | hdrl_image ** | out,
|  | cpl_image ** | contrib,
|  | cpl_image ** | reject_low,
|  | cpl_image ** | reject_high
| ) |  |

Minmax-clipped collapsing of image list.

Parameters

  himlist | input image list
  nlow | low number of pixels to reject
  nhigh | high number of pixels to reject
  out | output combined image
  contrib | output contribution mask
  reject_low | output low rejection thresholds, may be NULL
  reject_high | output high rejection thresholds, may be NULL

Returns
  CPL_ERROR_NONE or the relevant the cpl_error_code on error

See also
  hdrl_imagelist_collapse()

Possible cpl_error_code set in this function:

- CPL_ERROR_NULL_INPUT if an input pointer is NULL

## ◆ hdrl_imagelist_collapse_mode()

cpl_error_code hdrl_imagelist_collapse_mode | ( | const hdrl_imagelist * | himlist,
|  | double | histo_min,
|  | double | histo_max,
|  | double | bin_size,
|  | hdrl_mode_type | mode_method,
|  | cpl_size | error_niter,
|  | hdrl_image ** | out,
|  | cpl_image ** | contrib
| ) |  |

Mode collapsing of image list.

Parameters

  himlist | input image list
  histo_min | minimum value of low pixels to use
  histo_max | maximum value of high pixels to be use
  bin_size | size of the histogram bin
  mode_method | mode_method to use for the mode computation
  error_niter | number of iterations to compute the error of the mode
  out | output combined image
  contrib | output contribution mask

Returns
  CPL_ERROR_NONE or the relevant the cpl_error_code on error

Possible cpl_error_code set in this function:

- CPL_ERROR_NULL_INPUT if an input pointer is NULL

## ◆ hdrl_imagelist_collapse_sigclip()

cpl_error_code hdrl_imagelist_collapse_sigclip | ( | const hdrl_imagelist * | himlist,
|  | double | kappa_low,
|  | double | kappa_high,
|  | int | niter,
|  | hdrl_image ** | out,
|  | cpl_image ** | contrib,
|  | cpl_image ** | reject_low,
|  | cpl_image ** | reject_high
| ) |  |

Sigma-clipped collapsing of image list.

Parameters

  himlist | input image list
  kappa_low | low sigma bound
  kappa_high | high sigma bound
  niter | number of clipping iterators
  out | output combined image
  contrib | output contribution mask
  reject_low | output low rejection thresholds, may be NULL
  reject_high | output high rejection thresholds, may be NULL

Returns
  CPL_ERROR_NONE or the relevant the cpl_error_code on error

See also
  hdrl_imagelist_collapse()

Possible cpl_error_code set in this function:

- CPL_ERROR_NULL_INPUT if an input pointer is NULL

## ◆ hdrl_imagelist_collapse_weighted_mean()

cpl_error_code hdrl_imagelist_collapse_weighted_mean | ( | const hdrl_imagelist * | himlist,
|  | hdrl_image ** | out,
|  | cpl_image ** | contrib
| ) |  |

Weighted Mean collapsing of image list.

Parameters

  himlist | input image list
  out | output combined image
  contrib | output contribution mask

Returns
  CPL_ERROR_NONE or the relevant the cpl_error_code on error

Possible cpl_error_code set in this function:

- CPL_ERROR_NULL_INPUT if an input pointer is NULL

## ◆ hdrl_imagelist_create()

hdrl_imagelist * hdrl_imagelist_create | ( | cpl_imagelist * | imlist,
|  | cpl_imagelist * | errlist
| ) |  |

Create an hdrl_imagelist out of 2 cpl_imagelist.

Parameters

  imlist | the list of image
  errlist | the list of errors

Returns
  The new hdrl_imagelist

Possible cpl_error_code set in this function:

- CPL_ERROR_NULL_INPUT if an input pointer is NULL

## ◆ hdrl_imagelist_delete()

void hdrl_imagelist_delete | ( | hdrl_imagelist * | himlist | ) |

Free all memory used by a hdrl_imagelist object including the images.

Parameters

  himlist | The image list or NULL

See also
  hdrl_imagelist_empty(), hdrl_imagelist_unwrap()

## ◆ hdrl_imagelist_div_image()

cpl_error_code hdrl_imagelist_div_image | ( | hdrl_imagelist * | himlist,
|  | const hdrl_image * | himg
| ) |  |

Divide an image from an image list.

Parameters

  himlist | input image list (modified)
  himg | image to divide

Returns
  the cpl_error_code or CPL_ERROR_NONE

See also
  hdrl_image_div_image()
  hdrl_imagelist_add_image()

The passed image is used to divide each image of the passed image list.

Possible cpl_error_code set in this function:

- CPL_ERROR_NULL_INPUT if an input pointer is NULL

## ◆ hdrl_imagelist_div_imagelist()

cpl_error_code hdrl_imagelist_div_imagelist | ( | hdrl_imagelist * | himlist1,
|  | const hdrl_imagelist * | himlist2
| ) |  |

Divide two image lists, the first one is replaced by the result.

Parameters

  himlist1 | first input image list (modified)
  himlist2 | image list to divide

Returns
  the cpl_error_code or CPL_ERROR_NONE

See also
  hdrl_image_div_image()
  hdrl_imagelist_add_imagelist

## ◆ hdrl_imagelist_div_scalar()

cpl_error_code hdrl_imagelist_div_scalar | ( | hdrl_imagelist * | himlist,
|  | hdrl_value | value
| ) |  |

Elementwise division by a scalar to each image in the himlist.

Parameters

  himlist | Imagelist to be modified in place.
  value | Value to divide to the images

Returns
  the cpl_error_code or CPL_ERROR_NONE

See also
  hdrl_image_div_scalar()
  hdrl_imagelist_add_scalar()

Possible cpl_error_code set in this function:

- CPL_ERROR_NULL_INPUT if an input pointer is NULL

## ◆ hdrl_imagelist_dump_structure()

cpl_error_code hdrl_imagelist_dump_structure | ( | const hdrl_imagelist * | himlist,
|  | FILE * | stream
| ) |  |

Dump structural information of images in an imagelist.

Parameters

  himlist | Imagelist to dump
  stream | Output stream, accepts `stdout` or `stderr`

Returns
  CPL_ERROR_NONE or the relevant cpl_error_code on error

Possible cpl_error_code set in this function:

- CPL_ERROR_NULL_INPUT if an input pointer is NULL
- CPL_ERROR_FILE_IO if a write operation fails

## ◆ hdrl_imagelist_dump_window()

cpl_error_code hdrl_imagelist_dump_window | ( | const hdrl_imagelist * | himlist,
|  | cpl_size | llx,
|  | cpl_size | lly,
|  | cpl_size | urx,
|  | cpl_size | ury,
|  | FILE * | stream
| ) |  |

Dump pixel values of images in a imagelist.

Parameters

  himlist | Imagelist to dump
  llx | Specifies the window position
  lly | Specifies the window position
  urx | Specifies the window position
  ury | Specifies the window position
  stream | Output stream, accepts `stdout` or `stderr`

Returns
  CPL_ERROR_NONE or the relevant cpl_error_code on error

Possible cpl_error_code set in this function:

- CPL_ERROR_NULL_INPUT if an input pointer is NULL
- CPL_ERROR_FILE_IO if a write operation fails
- CPL_ERROR_ACCESS_OUT_OF_RANGE if the defined window is not in the image
- CPL_ERROR_ILLEGAL_INPUT if the window definition is wrong (e.g llx > urx)

## ◆ hdrl_imagelist_duplicate()

hdrl_imagelist * hdrl_imagelist_duplicate | ( | const hdrl_imagelist * | himlist | ) |

Duplicate an image list.

Parameters

  himlist | Source image list.

Returns
  1 newly allocated image list, or NULL on error.

Copy an image list into a new image list object. The returned image list must be deallocated using hdrl_imagelist_delete().

Possible cpl_error_code set in this function:

- CPL_ERROR_NULL_INPUT if an input pointer is NULL

## ◆ hdrl_imagelist_empty()

void hdrl_imagelist_empty | ( | hdrl_imagelist * | himlist | ) |

Empty an imagelist and deallocate all its images.

Parameters

  himlist | The image list or NULL

See also
  hdrl_imagelist_empty(), hdrl_imagelist_delete()

Note
  If himlist is `NULL` nothing is done and no error is set.

After the call the image list can be populated again. It must eventually be deallocated with a call to hdrl_imagelist_delete().

## ◆ hdrl_imagelist_get()

hdrl_image * hdrl_imagelist_get | ( | const hdrl_imagelist * | himlist,
|  | cpl_size | inum
| ) |  |

Get an image from a list of images.

Parameters

  himlist | the image list
  inum | the image id (from 0 to number of images-1)

Returns
  A pointer to the image or NULL in error case.

The returned pointer refers to already allocated data.

Possible cpl_error_code set in this function:

- CPL_ERROR_NULL_INPUT if an input pointer is NULL
- CPL_ERROR_ACCESS_OUT_OF_RANGE if inum is bigger thant the list size
- CPL_ERROR_ILLEGAL_INPUT if inum is negative

## ◆ hdrl_imagelist_get_const()

const hdrl_image * hdrl_imagelist_get_const | ( | const hdrl_imagelist * | himlist,
|  | cpl_size | inum
| ) |  |

Get an image from a list of images.

Parameters

  himlist | the image list
  inum | the image id (from 0 to number of images-1)

Returns
  A pointer to the image or NULL in error case.

See also
  hdrl_imagelist_get

## ◆ hdrl_imagelist_get_iter_row_slices()

hdrl_iter * hdrl_imagelist_get_iter_row_slices | ( | const hdrl_imagelist * | hlist,
|  | cpl_size | nrows,
|  | cpl_size | overlap,
|  | hdrl_iter_flags | flags
| ) |  |

## ◆ hdrl_imagelist_get_size()

cpl_size hdrl_imagelist_get_size | ( | const hdrl_imagelist * | himlist | ) |

Get the number of images in the imagelist.

Parameters

  himlist | the list of images

Returns
  The number of images or -1 on error

Possible cpl_error_code set in this function:

- CPL_ERROR_NULL_INPUT if an input pointer is NULL

## ◆ hdrl_imagelist_get_size_x()

cpl_size hdrl_imagelist_get_size_x | ( | const hdrl_imagelist * | himlist | ) |

Get number of colums of images in the imagelist.

Parameters

  himlist | the list of images

Returns
  The number of columns of images or -1 on error

assumes the imagelist is uniform (cpl_imagelist_is_uniform)

Possible cpl_error_code set in this function:

- CPL_ERROR_NULL_INPUT if an input pointer is NULL
- CPL_ERROR_ILLEGAL_INPUT if the list is empty

## ◆ hdrl_imagelist_get_size_y()

cpl_size hdrl_imagelist_get_size_y | ( | const hdrl_imagelist * | himlist | ) |

Get number of rows of images in the imagelist.

Parameters

  himlist | the list of images

Returns
  The number of rows of images or -1 on error

assumes the imagelist is uniform (cpl_imagelist_is_uniform)

Possible cpl_error_code set in this function:

- CPL_ERROR_NULL_INPUT if an input pointer is NULL
- CPL_ERROR_ILLEGAL_INPUT if the list is empty

## ◆ hdrl_imagelist_is_consistent()

int hdrl_imagelist_is_consistent | ( | const hdrl_imagelist * | himlist | ) |

Determine if an imagelist contains images of equal size and type.

Parameters

  himlist | The imagelist to check

Returns
  Zero if ok, positive if not consistent and negative on error.

The function returns 1 if the list is empty.

Possible cpl_error_code set in this function:

- CPL_ERROR_NULL_INPUT if an input pointer is NULL

## ◆ hdrl_imagelist_iter_row_slices_get_data()

hdrl_il_rowsliceiter_data hdrl_imagelist_iter_row_slices_get_data | ( | const hdrl_iter * | it | ) |

## ◆ hdrl_imagelist_mul_image()

cpl_error_code hdrl_imagelist_mul_image | ( | hdrl_imagelist * | himlist,
|  | const hdrl_image * | himg
| ) |  |

Multiply an image by an image list.

Parameters

  himlist | input image list (modified)
  himg | image to multiply

Returns
  the cpl_error_code or CPL_ERROR_NONE

See also
  hdrl_image_mul_image()
  hdrl_imagelist_add_image()

The passed image is multiplied by each image of the passed image list.

Possible cpl_error_code set in this function:

- CPL_ERROR_NULL_INPUT if an input pointer is NULL

## ◆ hdrl_imagelist_mul_imagelist()

cpl_error_code hdrl_imagelist_mul_imagelist | ( | hdrl_imagelist * | himlist1,
|  | const hdrl_imagelist * | himlist2
| ) |  |

Multiply two image lists, the first one is replaced by the result.

Parameters

  himlist1 | first input image list (modified)
  himlist2 | image list to multiply

Returns
  the cpl_error_code or CPL_ERROR_NONE

See also
  hdrl_image_mul_image()
  hdrl_imagelist_add_imagelist

## ◆ hdrl_imagelist_mul_scalar()

cpl_error_code hdrl_imagelist_mul_scalar | ( | hdrl_imagelist * | himlist,
|  | hdrl_value | value
| ) |  |

Elementwise multiplication of a scalar to each image in the himlist.

Parameters

  himlist | Imagelist to be modified in place.
  value | Value to multiply to the images

Returns
  the cpl_error_code or CPL_ERROR_NONE

See also
  hdrl_image_mul_scalar()
  hdrl_imagelist_add_scalar()

Possible cpl_error_code set in this function:

- CPL_ERROR_NULL_INPUT if an input pointer is NULL

## ◆ hdrl_imagelist_new()

hdrl_imagelist * hdrl_imagelist_new | ( | void |  | ) |

Create an empty imagelist.

Returns
  1 newly allocated hdrl_imagelist

See also
  hdrl_imagelist_set() The returned hdrl_imagelist must be deallocated using hdrl_imagelist_delete()

## ◆ hdrl_imagelist_pow_scalar()

cpl_error_code hdrl_imagelist_pow_scalar | ( | hdrl_imagelist * | himlist,
|  | hdrl_value | exponent
| ) |  |

Compute the elementwise power of each image in the himlist.

Parameters

  himlist | Imagelist to be modified in place.
  exponent | Scalar exponent

Returns
  CPL_ERROR_NONE or the relevant the cpl_error_code on error

See also
  hdrl_image_power()

Possible cpl_error_code set in this function:

- CPL_ERROR_NULL_INPUT if an input pointer is NULL

## ◆ hdrl_imagelist_set()

cpl_error_code hdrl_imagelist_set | ( | hdrl_imagelist * | himlist,
|  | hdrl_image * | himg,
|  | cpl_size | pos
| ) |  |

Insert an image into an imagelist.

Parameters

  himlist | The imagelist
  himg | The image to insert
  pos | The list position (from 0 to number of images)

Returns
  CPL_ERROR_NONE or the relevant cpl_error_code on error

It is allowed to specify the position equal to the number of images in the list. This will increment the size of the imagelist.

No action occurs if an image is inserted more than once into the same position. It is allowed to insert the same image into two different positions in a list.

The image is inserted at the position pos in the image list. If the image already there is only present in that one location in the list, then the image is deallocated.

It is not allowed to insert images of different size into a list.

The added image is owned by the imagelist object, which deallocates it hdrl_imagelist_delete is called. Other option is to use hdrl_imagelist_unset to recover ownership of the image, in which case the hdrl_imagelist object is not longer responsible for deallocating it.

Possible cpl_error_code set in this function:

- CPL_ERROR_NULL_INPUT if an input pointer is NULL
- CPL_ERROR_ILLEGAL_INPUT if pos is negative
- CPL_ERROR_TYPE_MISMATCH if himg and himlist are of different types
- CPL_ERROR_INCOMPATIBLE_INPUT if himg and himlist have different sizes
- CPL_ERROR_ACCESS_OUT_OF_RANGE if pos is bigger than the number of images in himlist

## ◆ hdrl_imagelist_sub_image()

cpl_error_code hdrl_imagelist_sub_image | ( | hdrl_imagelist * | himlist,
|  | const hdrl_image * | himg
| ) |  |

Subtract an image from an image list.

Parameters

  himlist | input image list (modified)
  himg | image to subtract

Returns
  the cpl_error_code or CPL_ERROR_NONE

See also
  hdrl_image_sub_image()
  hdrl_imagelist_add_image()

The passed image is subtracted from each image of the passed image list.

Possible cpl_error_code set in this function:

- CPL_ERROR_NULL_INPUT if an input pointer is NULL

## ◆ hdrl_imagelist_sub_imagelist()

cpl_error_code hdrl_imagelist_sub_imagelist | ( | hdrl_imagelist * | himlist1,
|  | const hdrl_imagelist * | himlist2
| ) |  |

Subtract two image lists, the first one is replaced by the result.

Parameters

  himlist1 | first input image list (modified)
  himlist2 | image list to subtract

Returns
  the cpl_error_code or CPL_ERROR_NONE

See also
  hdrl_image_sub_image()
  hdrl_imagelist_add_imagelist

## ◆ hdrl_imagelist_sub_scalar()

cpl_error_code hdrl_imagelist_sub_scalar | ( | hdrl_imagelist * | himlist,
|  | hdrl_value | value
| ) |  |

Elementwise subtraction of a scalar to each image in the himlist.

Parameters

  himlist | Imagelist to be modified in place.
  value | Value to subtract to the images

Returns
  the cpl_error_code or CPL_ERROR_NONE

See also
  hdrl_image_sub_scalar()
  hdrl_imagelist_add_scalar()

Possible cpl_error_code set in this function:

- CPL_ERROR_NULL_INPUT if an input pointer is NULL

## ◆ hdrl_imagelist_unset()

hdrl_image * hdrl_imagelist_unset | ( | hdrl_imagelist * | himlist,
|  | cpl_size | pos
| ) |  |

Remove an image from an imagelist.

Parameters

  himlist | The imagelist
  pos | The list position (from 0 to number of images-1)

Returns
  The pointer to the removed image or NULL in error case

The specified image is not deallocated, it is simply removed from the list. The pointer to the image is returned to let the user decide to deallocate it or not. Eventually, the image will have to be deallocated with hdrl_image_delete().

Possible cpl_error_code set in this function:

- CPL_ERROR_NULL_INPUT if an input pointer is NULL
- CPL_ERROR_ILLEGAL_INPUT if pos is negative
- CPL_ERROR_ACCESS_OUT_OF_RANGE if pos is bigger than the number of images in himlist

## ◆ hdrl_imagelist_unwrap()

void hdrl_imagelist_unwrap | ( | hdrl_imagelist * | himlist | ) |