Image arithmetical function declaration. This file is part of the DDT Image Handling Library and provides functions to perform arithmetical computations on CPL images.
More...
#include <vector>
#include <cpl.h>
Go to the source code of this file.
|
|
bool | AddCplImages (cpl_image *image1, const cpl_image *image2) |
|
cpl_image * | AddCplImagesCreate (const cpl_image *image1, const cpl_image *image2) |
|
bool | AddScalarCplImage (cpl_image *image, double scalar) |
|
cpl_image * | AddScalarCplImageCreate (const cpl_image *image, double scalar) |
|
bool | SubtractCplImages (cpl_image *image1, const cpl_image *image2) |
|
cpl_image * | SubtractCplImagesCreate (const cpl_image *image1, const cpl_image *image2) |
|
bool | SubtractScalarCplImage (cpl_image *image, double scalar) |
|
cpl_image * | SubtractScalarCplImageCreate (const cpl_image *image, double scalar) |
|
bool | MultiplyCplImages (cpl_image *image1, const cpl_image *image2) |
|
cpl_image * | MultiplyCplImagesCreate (const cpl_image *image1, const cpl_image *image2) |
|
bool | MultiplyScalarCplImage (cpl_image *image, double scalar) |
|
cpl_image * | MultiplyScalarCplImageCreate (const cpl_image *image, double scalar) |
|
bool | DivideCplImages (cpl_image *image1, const cpl_image *image2) |
|
cpl_image * | DivideCplImagesCreate (const cpl_image *image1, const cpl_image *image2) |
|
bool | DivideScalarCplImage (cpl_image *image, double scalar) |
|
cpl_image * | DivideScalarCplImageCreate (const cpl_image *image, double scalar) |
|
Image arithmetical function declaration. This file is part of the DDT Image Handling Library and provides functions to perform arithmetical computations on CPL images.
- Copyright
- (c) Copyright ESO 2020 All Rights Reserved ESO (eso.org) is an Intergovernmental Organization, and therefore special legal conditions apply.
- Author
- Christoph Bortlisz, CGI
- Since
- 2020/07/29
◆ AddCplImages()
bool AddCplImages |
( |
cpl_image * | image1, |
|
|
const cpl_image * | image2 ) |
This file is part of the DDT Image Handling Library and provides functions to perform arithmetical computations on CPL images.. Add two images. The result will be stored in the first image, which will be modified according to the result of the operation
- Parameters
-
image1 | first CPL image object, will also contain the result of the addition |
image2 | second CPL image object |
- Returns
- bool indicating success of addition; the operation will fail in case that the images have different sizes or if one has a complex image type, while the other one has not
◆ AddCplImagesCreate()
cpl_image * AddCplImagesCreate |
( |
const cpl_image * | image1, |
|
|
const cpl_image * | image2 ) |
Add two images. This function returns the newly created image. It supports images with different types. The returned image has the type of the first passed image.
- Parameters
-
image1 | first CPL image object |
image2 | second CPL image object |
- Returns
- cpl_image the newly created image, or NULL on failure; the operation will fail in case that the images have different sizes or if one has a complex image type, while the other one has not
◆ AddScalarCplImage()
bool AddScalarCplImage |
( |
cpl_image * | image, |
|
|
double | scalar ) |
Add scalar to CPL image. The result will be stored in the provided image.
- Parameters
-
image | CPL image object, will also contain the result of the addition |
scalar | the number to be added elementwise to the CPL image |
- Returns
- bool indicating success of addition
◆ AddScalarCplImageCreate()
cpl_image * AddScalarCplImageCreate |
( |
const cpl_image * | image, |
|
|
double | scalar ) |
Add scalar to CPL image. This function returns a newly created image containing the result of the addition.
- Parameters
-
image | CPL image object |
scalar | the number to be added elementwise to the CPL image |
- Returns
- cpl_image the newly created image, or NULL on failure
◆ DivideCplImages()
bool DivideCplImages |
( |
cpl_image * | image1, |
|
|
const cpl_image * | image2 ) |
Divide two images. The result will be stored in the first image, which will be modified according to the result of the operation
- Parameters
-
image1 | first CPL image object, will also contain the result of the division |
image2 | second CPL image object |
- Returns
- bool indicating success of division; the operation will fail in case that the images have different sizes, if one has a complex image type, while the other one has not or if all pixels in the divisor image are zero
◆ DivideCplImagesCreate()
cpl_image * DivideCplImagesCreate |
( |
const cpl_image * | image1, |
|
|
const cpl_image * | image2 ) |
Divide two images. This function returns the newly created image. It supports images with different types. The returned image has the type of the first passed image.
- Parameters
-
image1 | first CPL image object |
image2 | second CPL image object |
- Returns
- cpl_image the newly created image, or NULL on failure; the operation will fail in case that the images have different sizes, if one has a complex image type, while the other one has not or if all pixels in the divisor image are zero
◆ DivideScalarCplImage()
bool DivideScalarCplImage |
( |
cpl_image * | image, |
|
|
double | scalar ) |
Divide CPL image with scalar. The result will be stored in the provided image. The scalar value has to be non-zero, otherwise an error will be returned
- Parameters
-
image | CPL image object, will also contain the result of the division |
scalar | the number to divide the CPL image elementwise with |
- Returns
- bool indicating success of division
◆ DivideScalarCplImageCreate()
cpl_image * DivideScalarCplImageCreate |
( |
const cpl_image * | image, |
|
|
double | scalar ) |
Divide CPL image with scalar. This function returns a newly created image containing the result of the division. The scalar value has to be non-zero, otherwise an error will be returned
- Parameters
-
image | CPL image object |
scalar | the number to divide the CPL image elementwise with |
- Returns
- cpl_image the newly created image, or NULL on failure
◆ MultiplyCplImages()
bool MultiplyCplImages |
( |
cpl_image * | image1, |
|
|
const cpl_image * | image2 ) |
Multiply two images. The result will be stored in the first image, which will be modified according to the result of the operation
- Parameters
-
image1 | first CPL image object, will also contain the result of the multiplication |
image2 | second CPL image object |
- Returns
- bool indicating success of multiplication; the operation will fail in case that the images have different sizes or if one has a complex image type, while the other one has not
◆ MultiplyCplImagesCreate()
cpl_image * MultiplyCplImagesCreate |
( |
const cpl_image * | image1, |
|
|
const cpl_image * | image2 ) |
Multiply two images. This function returns the newly created image. It supports images with different types. The returned image has the type of the first passed image.
- Parameters
-
image1 | first CPL image object |
image2 | second CPL image object |
- Returns
- cpl_image the newly created image, or NULL on failure; the operation will fail in case that the images have different sizes or if one has a complex image type, while the other one has not
◆ MultiplyScalarCplImage()
bool MultiplyScalarCplImage |
( |
cpl_image * | image, |
|
|
double | scalar ) |
Multiply scalar with CPL image. The result will be stored in the provided image.
- Parameters
-
image | CPL image object, will also contain the result of the multiplication |
scalar | the number to be multiplied elementwise with the CPL image |
- Returns
- bool indicating success of multiplication
◆ MultiplyScalarCplImageCreate()
cpl_image * MultiplyScalarCplImageCreate |
( |
const cpl_image * | image, |
|
|
double | scalar ) |
Multiply scalar with CPL image. This function returns a newly created image containing the result of the multiplication.
- Parameters
-
image | CPL image object |
scalar | the number to be multiplied elementwise with the CPL image |
- Returns
- cpl_image the newly created image, or NULL on failure
◆ SubtractCplImages()
bool SubtractCplImages |
( |
cpl_image * | image1, |
|
|
const cpl_image * | image2 ) |
Subtract two images. The result will be stored in the first image, which will be modified according to the result of the operation
- Parameters
-
image1 | first CPL image object, will also contain the result of the subtraction |
image2 | second CPL image object |
- Returns
- bool indicating success of subtraction; the operation will fail in case that the images have different sizes or if one has a complex image type, while the other one has not
◆ SubtractCplImagesCreate()
cpl_image * SubtractCplImagesCreate |
( |
const cpl_image * | image1, |
|
|
const cpl_image * | image2 ) |
Subtract two images. This function returns the newly created image. It supports images with different types. The returned image has the type of the first passed image.
- Parameters
-
image1 | first CPL image object |
image2 | second CPL image object |
- Returns
- cpl_image the newly created image, or NULL on failure; the operation will fail in case that the images have different sizes or if one has a complex image type, while the other one has not
◆ SubtractScalarCplImage()
bool SubtractScalarCplImage |
( |
cpl_image * | image, |
|
|
double | scalar ) |
Subtract scalar from CPL image. The result will be stored in the provided image.
- Parameters
-
image | CPL image object, will also contain the result of the subtraction |
scalar | the number to be subtracted elementwise from the CPL image |
- Returns
- bool indicating success of subtraction
◆ SubtractScalarCplImageCreate()
cpl_image * SubtractScalarCplImageCreate |
( |
const cpl_image * | image, |
|
|
double | scalar ) |
Subtract scalar from CPL image. This function returns a newly created image containing the result of the subtraction.
- Parameters
-
image | CPL image object |
scalar | the number to be subtracted elementwise from the CPL image |
- Returns
- cpl_image the newly created image, or NULL on failure