High-Level Data Reduction Library 1.6.0
High-Level data reduction routines for ESO pipelines
Loading...
Searching...
No Matches
Image object

Functions

cpl_image * hdrl_image_get_image (hdrl_image *himg)
 get data as cpl image
 
const cpl_image * hdrl_image_get_image_const (const hdrl_image *himg)
 get data as cpl image
 
cpl_image * hdrl_image_get_error (hdrl_image *himg)
 get error as cpl image
 
const cpl_image * hdrl_image_get_error_const (const hdrl_image *himg)
 get error as cpl image
 
cpl_mask * hdrl_image_get_mask (hdrl_image *himg)
 get cpl bad pixel mask from image
 
const cpl_mask * hdrl_image_get_mask_const (const hdrl_image *himg)
 get cpl bad pixel mask from image
 
hdrl_imagehdrl_image_wrap (cpl_image *img, cpl_image *err, hdrl_free *destructor, cpl_boolean sync_mask)
 
void hdrl_image_unwrap (hdrl_image *himg)
 
hdrl_imagehdrl_image_create (const cpl_image *image, const cpl_image *error)
 create a new hdrl_image from to existing images by copying them
 
hdrl_imagehdrl_image_new (cpl_size nx, cpl_size ny)
 create new zero filled hdrl image
 
hdrl_imagehdrl_image_new_from_buffer (cpl_size nx, cpl_size ny, hdrl_buffer *buf)
 
void hdrl_image_delete (hdrl_image *himg)
 delete hdrl_image
 
hdrl_imagehdrl_image_duplicate (const hdrl_image *himg)
 copy hdrl_image
 
cpl_error_code hdrl_image_reject_from_mask (hdrl_image *self, const cpl_mask *map)
 set bpm of hdrl_image
 
cpl_error_code hdrl_image_reject (hdrl_image *self, cpl_size xpos, cpl_size ypos)
 mark pixel as bad
 
int hdrl_image_is_rejected (hdrl_image *self, cpl_size xpos, cpl_size ypos)
 return if pixel is marked bad
 
cpl_size hdrl_image_count_rejected (const hdrl_image *self)
 return number of rejected pixels
 
cpl_error_code hdrl_image_reject_value (hdrl_image *self, cpl_value mode)
 Reject pixels with the specified special value(s)
 
cpl_error_code hdrl_image_accept (hdrl_image *self, cpl_size xpos, cpl_size ypos)
 mark pixel as good
 
cpl_error_code hdrl_image_accept_all (hdrl_image *self)
 Accept all pixels in an image.
 
cpl_size hdrl_image_get_size_x (const hdrl_image *self)
 return size of X dimension of image
 
cpl_size hdrl_image_get_size_y (const hdrl_image *self)
 return size of Y dimension of image
 
hdrl_value hdrl_image_get_pixel (const hdrl_image *self, cpl_size xpos, cpl_size ypos, int *pis_rejected)
 get pixel values of hdrl_image
 
cpl_error_code hdrl_image_set_pixel (hdrl_image *self, cpl_size xpos, cpl_size ypos, hdrl_value value)
 set pixel values of hdrl_image
 
hdrl_imagehdrl_image_extract (const hdrl_image *self, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury)
 extract copy of window from image
 
cpl_error_code hdrl_image_turn (hdrl_image *self, int rot)
 Rotate an image by a multiple of 90 degrees clockwise.
 
cpl_error_code hdrl_image_copy (hdrl_image *dst, const hdrl_image *src, cpl_size xpos, cpl_size ypos)
 Copy one image into another.
 
cpl_error_code hdrl_image_insert (hdrl_image *self, const cpl_image *image, const cpl_image *error, cpl_size xpos, cpl_size ypos)
 Copy cpl images into an hdrl image.
 
cpl_error_code hdrl_image_dump_structure (const hdrl_image *himg, FILE *stream)
 Dump structural information of a HDRL image.
 
cpl_error_code hdrl_image_dump_window (const hdrl_image *himg, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury, FILE *stream)
 Dump pixel values in a HDRL image.
 
cpl_error_code hdrl_image_add_image (hdrl_image *self, const hdrl_image *other)
 Add two images, store the result in the first image.
 
hdrl_imagehdrl_image_add_image_create (const hdrl_image *self, const hdrl_image *other)
 Add two images.
 
cpl_error_code hdrl_image_add_scalar (hdrl_image *self, hdrl_value value)
 Elementwise addition of a scalar to an image.
 
cpl_error_code hdrl_image_sub_image (hdrl_image *self, const hdrl_image *other)
 Subtract two images, store the result in the first image.
 
hdrl_imagehdrl_image_sub_image_create (const hdrl_image *self, const hdrl_image *other)
 Subtract two images.
 
cpl_error_code hdrl_image_sub_scalar (hdrl_image *self, hdrl_value value)
 Elementwise subtraction of a scalar from an image.
 
cpl_error_code hdrl_image_mul_image (hdrl_image *self, const hdrl_image *other)
 Multiply two images, store the result in the first image.
 
hdrl_imagehdrl_image_mul_image_create (const hdrl_image *self, const hdrl_image *other)
 Multiply two images.
 
cpl_error_code hdrl_image_mul_scalar (hdrl_image *self, hdrl_value value)
 Elementwise multiplication of an image with a scalar.
 
cpl_error_code hdrl_image_div_image (hdrl_image *self, const hdrl_image *other)
 Divide two images, store the result in the first image.
 
hdrl_imagehdrl_image_div_image_create (const hdrl_image *self, const hdrl_image *other)
 Divide two images and return the resulting image.
 
cpl_error_code hdrl_image_div_scalar (hdrl_image *self, hdrl_value value)
 Elementwise division of an image with a scalar.
 
hdrl_value hdrl_image_get_mean (const hdrl_image *self)
 computes mean pixel value and associated error of an image.
 
hdrl_value hdrl_image_get_sigclip_mean (const hdrl_image *self, double kappa_low, double kappa_high, int niter)
 computes the sigma-clipped mean and associated error of an image.
 
hdrl_value hdrl_image_get_minmax_mean (const hdrl_image *self, double nlow, double nhigh)
 computes the minmax rejected mean and the associated error of an image.
 
hdrl_value hdrl_image_get_mode (const hdrl_image *self, double histo_min, double histo_max, double bin_size, hdrl_mode_type method, cpl_size error_niter)
 computes the mode and the associated error of an image.
 
hdrl_value hdrl_image_get_median (const hdrl_image *self)
 computes the median and associated error of an image.
 
hdrl_value hdrl_image_get_weighted_mean (const hdrl_image *self)
 computes the weighted mean and associated error of an image.
 
double hdrl_image_get_stdev (const hdrl_image *self)
 computes the standard deviation of the data of an image
 
hdrl_value hdrl_image_get_sum (const hdrl_image *self)
 computes the sum of all pixel values and the associated error of an image.
 
hdrl_value hdrl_image_get_sqsum (const hdrl_image *self)
 computes the sum of all pixel values and the error of a squared image.
 
cpl_error_code hdrl_image_pow_scalar (hdrl_image *self, const hdrl_value exponent)
 computes the power of an image by a scalar
 
hdrl_imagehdrl_image_pow_scalar_create (const hdrl_image *self, const hdrl_value exponent)
 computes the power of an image by a scalar creating a new image
 
cpl_error_code hdrl_image_exp_scalar (hdrl_image *self, const hdrl_value base)
 computes the exponential of an image by a scalar
 
hdrl_imagehdrl_image_exp_scalar_create (const hdrl_image *self, const hdrl_value base)
 computes the exponential of an image by a scalar creating a new image
 

Detailed Description

hdrl_image is a two dimensional array object containing data and its associated errors. It provides a similar api to cpl_image and performs linear error propagation where it makes sense.

Function Documentation

◆ hdrl_image_accept()

cpl_error_code hdrl_image_accept ( hdrl_image self,
cpl_size  xpos,
cpl_size  ypos 
)

mark pixel as good

Parameters
selfimage
xposx coordinate (FITS CONVENTION)
yposy coordinate (FITS CONVENTION)
See also
cpl_image_accept

◆ hdrl_image_accept_all()

cpl_error_code hdrl_image_accept_all ( hdrl_image self)

Accept all pixels in an image.

Parameters
selfinput image
See also
cpl_image_accept_all

◆ hdrl_image_add_image()

cpl_error_code hdrl_image_add_image ( hdrl_image self,
const hdrl_image other 
)

Add two images, store the result in the first image.

Parameters
selffirst operand.
othersecond operand.
Returns
the cpl-error-code or CPL_ERROR_NONE

The first input image is modified to contain the result of the operation.

The bad pixel map of the first image becomes the union of the bad pixel maps of the input images.

Possible cpl-error-code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL
  • CPL_ERROR_INCOMPATIBLE_INPUT if the input images have different sizes

◆ hdrl_image_add_image_create()

hdrl_image * hdrl_image_add_image_create ( const hdrl_image self,
const hdrl_image other 
)

Add two images.

Parameters
selffirst operand
othersecond operand
Returns
1 newly allocated image or NULL on error

Creates a new image, being the result of the operation, and returns it to the caller. The returned image must be deallocated using hdrl_image_delete().

The bad pixels map of the result is the union of the bad pixels maps of the input images.

Possible cpl-error-code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL
  • CPL_ERROR_INCOMPATIBLE_INPUT if the input images have different sizes

◆ hdrl_image_add_scalar()

cpl_error_code hdrl_image_add_scalar ( hdrl_image self,
hdrl_value  value 
)

Elementwise addition of a scalar to an image.

Parameters
selfImage to be modified in place.
valueNumber to add
Returns
CPL_ERROR_NONE or the relevant the cpl-error-code on error

Modifies the image by adding a number to each of its pixels with error propagation.

Possible cpl-error-code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

◆ hdrl_image_copy()

cpl_error_code hdrl_image_copy ( hdrl_image dst,
const hdrl_image src,
cpl_size  xpos,
cpl_size  ypos 
)

Copy one image into another.

Parameters
dstthe image in which im2 is inserted
srcthe inserted image
xposthe x pixel position in im1 where the lower left pixel of im2 should go (from 1 to the x size of im1)
yposthe y pixel position in im1 where the lower left pixel of im2 should go (from 1 to the y size of im1)
Returns
CPL_ERROR_NONE or the relevant cpl_error_code on error.
See also
cpl_image_copy
Note
The two pixel buffers may not overlap

◆ hdrl_image_count_rejected()

cpl_size hdrl_image_count_rejected ( const hdrl_image self)

return number of rejected pixels

Parameters
selfimage
Returns
number of rejected pixels
See also
cpl_image_count_rejected

◆ hdrl_image_create()

hdrl_image * hdrl_image_create ( const cpl_image *  image,
const cpl_image *  error 
)

create a new hdrl_image from to existing images by copying them

Parameters
imagedata to copy
errorerrors to copy
Returns
hdrl_image
Note
The bad pixel mask of the error-image (error) is completely ignored. The bad pixel mask associated with the passed image (image) becomes the only relevant bad pixel mask.

◆ hdrl_image_delete()

void hdrl_image_delete ( hdrl_image himg)

delete hdrl_image

Note
may be used on views in which case the original memory is kept

◆ hdrl_image_div_image()

cpl_error_code hdrl_image_div_image ( hdrl_image self,
const hdrl_image other 
)

Divide two images, store the result in the first image.

Parameters
selffirst operand
othersecond operand
Returns
the cpl-error-code or CPL_ERROR_NONE
See also
hdrl_image_add_image()
Note
The result of division with a zero-valued pixel is marked as a bad pixel. Additionally, the value and the error are set to NAN

Possible cpl-error-code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL
  • CPL_ERROR_INCOMPATIBLE_INPUT if the input images have different sizes

◆ hdrl_image_div_image_create()

hdrl_image * hdrl_image_div_image_create ( const hdrl_image self,
const hdrl_image other 
)

Divide two images and return the resulting image.

Parameters
selffirst operand
othersecond operand
Returns
1 newly allocated image or NULL on error
See also
hdrl_image_add_image_create()
Note
The result of division with a zero-valued pixel is marked as a bad pixel. Additionally, the value and the error are set to NAN

Possible cpl-error-code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL
  • CPL_ERROR_INCOMPATIBLE_INPUT if the input images have different sizes

◆ hdrl_image_div_scalar()

cpl_error_code hdrl_image_div_scalar ( hdrl_image self,
hdrl_value  value 
)

Elementwise division of an image with a scalar.

Parameters
selfImage to be modified in place.
valueNon-zero number to divide with
Returns
CPL_ERROR_NONE or the relevant the cpl-error-code on error
See also
cpl_image_add_image_scalar()

Possible cpl-error-code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

◆ hdrl_image_dump_structure()

cpl_error_code hdrl_image_dump_structure ( const hdrl_image himg,
FILE *  stream 
)

Dump structural information of a HDRL image.

Parameters
himgImage to dump
streamOutput 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_image_dump_window()

cpl_error_code hdrl_image_dump_window ( const hdrl_image himg,
cpl_size  llx,
cpl_size  lly,
cpl_size  urx,
cpl_size  ury,
FILE *  stream 
)

Dump pixel values in a HDRL image.

Parameters
himgImage to dump
llxLower left x position (FITS convention, 1 for leftmost)
llyLower left y position (FITS convention, 1 for lowest)
urxSpecifies the window position
urySpecifies the window position
streamOutput 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_image_duplicate()

hdrl_image * hdrl_image_duplicate ( const hdrl_image himg)

copy hdrl_image

◆ hdrl_image_exp_scalar()

cpl_error_code hdrl_image_exp_scalar ( hdrl_image self,
const hdrl_value  base 
)

computes the exponential of an image by a scalar

Parameters
selfinput image
basebase of the power
Returns
CPL_ERROR_NONE or the relevant the cpl-error-code on error

◆ hdrl_image_exp_scalar_create()

hdrl_image * hdrl_image_exp_scalar_create ( const hdrl_image self,
const hdrl_value  base 
)

computes the exponential of an image by a scalar creating a new image

Parameters
selfinput image
basebase of the power
Returns
new image containing the powered data or NULL on error
See also
hdrl_image_pow_scalar

◆ hdrl_image_extract()

hdrl_image * hdrl_image_extract ( const hdrl_image self,
cpl_size  llx,
cpl_size  lly,
cpl_size  urx,
cpl_size  ury 
)

extract copy of window from image

Parameters
selfimage to extract from
llxlower left x coordinate of window (FITS convention)
llylower left y coordinate of window (FITS convention)
urxupper right x coordinate of window (FITS convention)
uryupper right y coordinate of window (FITS convention)
Returns
newly allocated hdrl_image containing the window
See also
cpl_image_extract

If the coordinates are < 1 the dimension of the image is added to them. So llx = 0 wraps to hdrl_image_get_size_x(self).

◆ hdrl_image_get_error()

cpl_image * hdrl_image_get_error ( hdrl_image himg)

get error as cpl image

Parameters
himghdrl image
Returns
cpl_image

◆ hdrl_image_get_error_const()

const cpl_image * hdrl_image_get_error_const ( const hdrl_image himg)

get error as cpl image

Parameters
himghdrl image
Returns
cpl_image

◆ hdrl_image_get_image()

cpl_image * hdrl_image_get_image ( hdrl_image himg)

get data as cpl image

Parameters
himghdrl image
Returns
cpl_image

◆ hdrl_image_get_image_const()

const cpl_image * hdrl_image_get_image_const ( const hdrl_image himg)

get data as cpl image

Parameters
himghdrl image
Returns
const cpl_image

◆ hdrl_image_get_mask()

cpl_mask * hdrl_image_get_mask ( hdrl_image himg)

get cpl bad pixel mask from image

Parameters
himghdrl image
Returns
cpl_mask, created when it does not exist

◆ hdrl_image_get_mask_const()

const cpl_mask * hdrl_image_get_mask_const ( const hdrl_image himg)

get cpl bad pixel mask from image

Parameters
himghdrl image
Returns
cpl_mask or NULL if no mask exists

◆ hdrl_image_get_mean()

hdrl_value hdrl_image_get_mean ( const hdrl_image self)

computes mean pixel value and associated error of an image.

Parameters
selfinput image
Returns
mean and its error in a hdrl_value structure

◆ hdrl_image_get_median()

hdrl_value hdrl_image_get_median ( const hdrl_image self)

computes the median and associated error of an image.

Parameters
selfinput image
Returns
median and its error in a hdrl_value structure

This function computes the median and the associated error of the image. For the error propagation the error is scaled by the sqrt of the statistical efficiency of the median on normal distributed data which is $ \frac{\pi}{ 2 } $

◆ hdrl_image_get_minmax_mean()

hdrl_value hdrl_image_get_minmax_mean ( const hdrl_image self,
double  nlow,
double  nhigh 
)

computes the minmax rejected mean and the associated error of an image.

Parameters
selfinput image
nlownumber of low pixels to reject
nhighnumber of high pixels to reject
Returns
minmax rejected mean and its error in a hdrl_value structure
See also
hdrl_minmax_clip() for the algorithm

◆ hdrl_image_get_mode()

hdrl_value hdrl_image_get_mode ( const hdrl_image self,
double  histo_min,
double  histo_max,
double  bin_size,
hdrl_mode_type  method,
cpl_size  error_niter 
)

computes the mode and the associated error of an image.

Parameters
selfinput image
histo_minminimum value of low pixels to use
histo_maxmaximum value of high pixels to be use
bin_sizesize of the histogram bin
methodmethod to use for the mode computation
error_niternumber of iterations to compute the error of the mode
Returns
the mode and its error in a hdrl_value structure
See also
hdrl_mode_clip() for the algorithm

◆ hdrl_image_get_pixel()

hdrl_value hdrl_image_get_pixel ( const hdrl_image self,
cpl_size  xpos,
cpl_size  ypos,
int *  pis_rejected 
)

get pixel values of hdrl_image

Parameters
selfimage
xposx coordinate (FITS CONVENTION)
yposy coordinate (FITS CONVENTION)
pis_rejectedint pointer to store if pixel is bad, may be NULL
Returns
data value of the pixel
See also
cpl_image_get

◆ hdrl_image_get_sigclip_mean()

hdrl_value hdrl_image_get_sigclip_mean ( const hdrl_image self,
double  kappa_low,
double  kappa_high,
int  niter 
)

computes the sigma-clipped mean and associated error of an image.

Parameters
selfinput image
kappa_lowlow sigma bound
kappa_highhigh sigma bound
nitermaximum number of clipping iterators
Returns
clipped mean and its error in a hdrl_value structure
See also
hdrl_kappa_sigma_clip() for the algorithm

◆ hdrl_image_get_size_x()

cpl_size hdrl_image_get_size_x ( const hdrl_image self)

return size of X dimension of image

Parameters
selfimage
Returns
size of X dimension of image
See also
cpl_image_get_size_x

◆ hdrl_image_get_size_y()

cpl_size hdrl_image_get_size_y ( const hdrl_image self)

return size of Y dimension of image

Parameters
selfimage
Returns
size of Y dimension of image
See also
cpl_image_get_size_y

◆ hdrl_image_get_sqsum()

hdrl_value hdrl_image_get_sqsum ( const hdrl_image self)

computes the sum of all pixel values and the error of a squared image.

Parameters
selfinput image
Returns
squared sum and its error in a hdrl_value structure

◆ hdrl_image_get_stdev()

double hdrl_image_get_stdev ( const hdrl_image self)

computes the standard deviation of the data of an image

Parameters
selfinput image
Returns
CPL_ERROR_NONE or the relevant the cpl-error-code on error
See also
cpl_image_get_stdev

◆ hdrl_image_get_sum()

hdrl_value hdrl_image_get_sum ( const hdrl_image self)

computes the sum of all pixel values and the associated error of an image.

Parameters
selfinput image
Returns
sum and its error in a hdrl_value structure

◆ hdrl_image_get_weighted_mean()

hdrl_value hdrl_image_get_weighted_mean ( const hdrl_image self)

computes the weighted mean and associated error of an image.

Parameters
selfinput image
Returns
weighted mean and its error in a hdrl_value structure

◆ hdrl_image_insert()

cpl_error_code hdrl_image_insert ( hdrl_image self,
const cpl_image *  image,
const cpl_image *  error,
cpl_size  xpos,
cpl_size  ypos 
)

Copy cpl images into an hdrl image.

Parameters
selfthe image in which the cpl images are inserted
imagethe inserted image
errorthe inserted error, may be NULL
xposthe x pixel position in im1 where the lower left pixel of im2 should go (from 1 to the x size of im1)
yposthe y pixel position in im1 where the lower left pixel of im2 should go (from 1 to the y size of im1)
Returns
CPL_ERROR_NONE or the relevant cpl_error_code on error.
See also
hdrl_image_copy
Note
The pixel buffers may not overlap

◆ hdrl_image_is_rejected()

int hdrl_image_is_rejected ( hdrl_image self,
cpl_size  xpos,
cpl_size  ypos 
)

return if pixel is marked bad

Parameters
selfimage
xposx coordinate (FITS CONVENTION)
yposy coordinate (FITS CONVENTION)
See also
cpl_image_is_rejected

◆ hdrl_image_mul_image()

cpl_error_code hdrl_image_mul_image ( hdrl_image self,
const hdrl_image other 
)

Multiply two images, store the result in the first image.

Parameters
selffirst operand.
othersecond operand.
Returns
the cpl-error-code or CPL_ERROR_NONE
See also
hdrl_image_add_image()

◆ hdrl_image_mul_image_create()

hdrl_image * hdrl_image_mul_image_create ( const hdrl_image self,
const hdrl_image other 
)

Multiply two images.

Parameters
selffirst operand
othersecond operand
Returns
1 newly allocated image or NULL on error
See also
hdrl_image_add_image_create()

◆ hdrl_image_mul_scalar()

cpl_error_code hdrl_image_mul_scalar ( hdrl_image self,
hdrl_value  value 
)

Elementwise multiplication of an image with a scalar.

Parameters
selfImage to be modified in place.
valueNumber to multiply with
Returns
CPL_ERROR_NONE or the relevant the cpl-error-code on error
See also
hdrl_image_add_scalar()

◆ hdrl_image_new()

hdrl_image * hdrl_image_new ( cpl_size  nx,
cpl_size  ny 
)

create new zero filled hdrl image

Parameters
nxsize in x
nysize in y
Returns
hdrl_image or NULL on error

◆ hdrl_image_new_from_buffer()

hdrl_image * hdrl_image_new_from_buffer ( cpl_size  nx,
cpl_size  ny,
hdrl_buffer *  buf 
)

◆ hdrl_image_pow_scalar()

cpl_error_code hdrl_image_pow_scalar ( hdrl_image self,
const hdrl_value  exponent 
)

computes the power of an image by a scalar

Parameters
selfinput image
exponentexponent of the power
Returns
CPL_ERROR_NONE or the relevant the cpl-error-code on error

◆ hdrl_image_pow_scalar_create()

hdrl_image * hdrl_image_pow_scalar_create ( const hdrl_image self,
const hdrl_value  exponent 
)

computes the power of an image by a scalar creating a new image

Parameters
selfinput image
exponentexponent of the power
Returns
new image containing the powered data or NULL on error
See also
hdrl_image_pow_scalar

◆ hdrl_image_reject()

cpl_error_code hdrl_image_reject ( hdrl_image self,
cpl_size  xpos,
cpl_size  ypos 
)

mark pixel as bad

Parameters
selfimage
xposx coordinate (FITS CONVENTION)
yposy coordinate (FITS CONVENTION)
See also
cpl_image_reject

◆ hdrl_image_reject_from_mask()

cpl_error_code hdrl_image_reject_from_mask ( hdrl_image self,
const cpl_mask *  map 
)

set bpm of hdrl_image

Parameters
selfimage on which to set bpm
mapbpm to set
See also
cpl_image_reject_from_mask

◆ hdrl_image_reject_value()

cpl_error_code hdrl_image_reject_value ( hdrl_image self,
cpl_value  mode 
)

Reject pixels with the specified special value(s)

Parameters
selfInput image to modify
modeBit field specifying which special value(s) to reject
See also
cpl_image_reject_value

◆ hdrl_image_set_pixel()

cpl_error_code hdrl_image_set_pixel ( hdrl_image self,
cpl_size  xpos,
cpl_size  ypos,
hdrl_value  value 
)

set pixel values of hdrl_image

Parameters
selfimage
xposx coordinate (FITS CONVENTION)
yposy coordinate (FITS CONVENTION)
valuedata value to set

◆ hdrl_image_sub_image()

cpl_error_code hdrl_image_sub_image ( hdrl_image self,
const hdrl_image other 
)

Subtract two images, store the result in the first image.

Parameters
selffirst operand.
othersecond operand.
Returns
the cpl-error-code or CPL_ERROR_NONE
See also
hdrl_image_add_image()

◆ hdrl_image_sub_image_create()

hdrl_image * hdrl_image_sub_image_create ( const hdrl_image self,
const hdrl_image other 
)

Subtract two images.

Parameters
selffirst operand
othersecond operand
Returns
1 newly allocated image or NULL on error
See also
hdrl_image_add_image_create()

◆ hdrl_image_sub_scalar()

cpl_error_code hdrl_image_sub_scalar ( hdrl_image self,
hdrl_value  value 
)

Elementwise subtraction of a scalar from an image.

Parameters
selfImage to be modified in place.
valueNumber to subtract
Returns
CPL_ERROR_NONE or the relevant the cpl-error-code on error
See also
hdrl_image_add_scalar()

◆ hdrl_image_turn()

cpl_error_code hdrl_image_turn ( hdrl_image self,
int  rot 
)

Rotate an image by a multiple of 90 degrees clockwise.

Parameters
selfThe image to rotate in place.
rotThe multiple: -1 is a rotation of 90 deg counterclockwise.
Returns
CPL_ERROR_NONE on success, otherwise the relevant cpl_error_code
See also
cpl_image_turn

◆ hdrl_image_unwrap()

void hdrl_image_unwrap ( hdrl_image himg)

◆ hdrl_image_wrap()

hdrl_image * hdrl_image_wrap ( cpl_image *  img,
cpl_image *  err,
hdrl_free destructor,
cpl_boolean  sync_mask 
)