ddt 1.1.0
|
Helper function declaration. This file is part of the DDT Image Handling Library and provides helper functions for handling of CPL images. More...
#include <tuple>
#include <vector>
#include <string>
#include <cpl.h>
Go to the source code of this file.
Functions | |
std::vector< int > | SubarrayLineInt (cpl_image *image, std::tuple< int, int > start, std::tuple< int, int > end) |
std::vector< int > | SubarrayLineInt (cpl_image *image, int x0, int y0, int x1, int y1) |
std::vector< double > | SubarrayLineDouble (cpl_image *image, int x0, int y0, const int x1, const int y1) |
std::vector< std::vector< int > > | SubarrayRectInt (cpl_image *image, std::tuple< int, int > start, std::tuple< int, int > end) |
std::vector< std::vector< int > > | SubarrayRectInt (cpl_image *image, int llx, int lly, int urx, int ury) |
cpl_image * | SubImageRect (cpl_image *image, std::tuple< int, int > start, std::tuple< int, int > end) |
cpl_image * | SubImageRect (cpl_image *image, int llx, int lly, int urx, int ury) |
cpl_image * | SubImageRectOutside (const cpl_image *const image, const int llx, const int lly, const int urx, const int ury) |
cpl_image * | SubImageCircular (const cpl_image *const image, const int xcenter, const int ycenter, const int radius) |
cpl_image * | SubImageCircularOutside (const cpl_image *const image, const int xcenter, const int ycenter, const int radius) |
double | PixelDistance (const double startx, const double starty, const double endx, const double endy, double *const xoffset=nullptr, double *const yoffset=nullptr) |
double | PixelDistanceDegrees (const cpl_propertylist *const property_list, const double startx, const double starty, const double endx, const double endy, double *const xoffsetdeg, double *const yoffsetdeg) |
double | PixelToDegreesScalingFactor (const cpl_propertylist *const property_list) |
std::string | ConvertDegreesToString (double deg) |
Helper function declaration. This file is part of the DDT Image Handling Library and provides helper functions for handling of CPL images.
std::string ConvertDegreesToString | ( | double | deg | ) |
Convert a degree value into a string representation of the form [dd:]hh:mm:ss. The degrees part dd is prepended only if it is != 0.
deg | the degrees value to be converted |
double PixelDistance | ( | const double | startx, |
const double | starty, | ||
const double | endx, | ||
const double | endy, | ||
double *const | xoffset, | ||
double *const | yoffset | ||
) |
Returns the pixel distance between two pixels, provided with their x and y coordinates. In addition, the x- and y-offset is returned.
startx | x coordinate of the first pixel |
starty | y coordinate of the first pixel |
endx | x coordinate of the second pixel |
endy | y coordinate of the second pixel |
xoffset | if provided and no nullptr, will contain the offset in x direction |
yoffset | if provided and no nullptr, will contain the offset in y direction |
Returns the pixel distance between two pixels, provided with their x and y coordinates. In addition, the x- and y-offset is returned.
startx | x coordinate of the first pixel |
starty | y coordinate of the first pixel |
endx | x coordinate of the second pixel |
endy | y coordinate of the second pixel |
xoffset | if provided and no nullptr, will contain the offset in x direction |
yoffset | if provided and no nullptr, will contain the offset in y direction |
double PixelDistanceDegrees | ( | const cpl_propertylist *const | property_list, |
const double | startx, | ||
const double | starty, | ||
const double | endx, | ||
const double | endy, | ||
double *const | xoffsetdeg, | ||
double *const | yoffsetdeg | ||
) |
Returns the distance in degrees between two pixels, provided with their x and y coordinates. In addition, the x- and y-offset in degrees is returned.
property_list | the cpl_propertylist object retrieved from a CPL image |
startx | x coordinate of the first pixel |
starty | y coordinate of the first pixel |
endx | x coordinate of the second pixel |
endy | y coordinate of the second pixel |
xoffsetdeg | if provided and no nullptr, will contain the offset in x direction |
yoffsetdeg | if provided and no nullptr, will contain the offset in y direction |
double PixelToDegreesScalingFactor | ( | const cpl_propertylist *const | property_list | ) |
Returns the scaling factor to convert pixel distances to degrees.
property_list | the cpl_propertylist object retrieved from a CPL image |
std::vector< double > SubarrayLineDouble | ( | cpl_image * | image, |
int | x0, | ||
int | y0, | ||
const int | x1, | ||
const int | y1 | ||
) |
Returns a double subarray of pixel values from a cpl_image along a line defined by start and end point (x and y image coordinates)
std::vector< int > SubarrayLineInt | ( | cpl_image * | image, |
int | x0, | ||
int | y0, | ||
int | x1, | ||
int | y1 | ||
) |
Returns an integer subarray of pixel values from a cpl_image along a line defined by start and end point (x and y image coordinates)
std::vector< int > SubarrayLineInt | ( | cpl_image * | image, |
std::tuple< int, int > | start, | ||
std::tuple< int, int > | end | ||
) |
This file is part of the DDT Image Handling Library and provides helper functions for the processing of CPL images. Returns an integer subarray of pixel values from a cpl_image along a line defined by start and end point (tuples of image coordinates)
This file is part of the DDT Image Handling Library and provides functions to process CPL images. Returns an integer subarray of pixel values from a cpl_image along a line defined by start and end point (tuples of image coordinates)
std::vector< std::vector< int > > SubarrayRectInt | ( | cpl_image * | image, |
int | llx, | ||
int | lly, | ||
int | urx, | ||
int | ury | ||
) |
Returns an integer subarray of pixel values from a cpl_image within a rectangle defined by two corners (coordinates of lower left and upper right corners)
std::vector< std::vector< int > > SubarrayRectInt | ( | cpl_image * | image, |
std::tuple< int, int > | start, | ||
std::tuple< int, int > | end | ||
) |
Returns an integer subarray of pixel values from a cpl_image within a rectangle defined by two corners (tuples of image coordinates)
cpl_image * SubImageCircular | ( | const cpl_image *const | image, |
const int | xcenter, | ||
const int | ycenter, | ||
const int | radius | ||
) |
Returns a circular CPL subimage from a cpl_image. The circular area is defined by the center coordinates and the radius. The returned image has all pixels lying outside the circular area added to the bad pixel map.
Note that the returned image has a odd number of pixels in each dimension. This is to have the center coordinate really in the center of the circle. So e.g. a radius of 25 will result in an image with 49 x 49 pixels. The resulting diameter of the circle will be: radius * 2 - 1
The image has to be deleted using cpl_image_delete().
cpl_image * SubImageCircularOutside | ( | const cpl_image *const | image, |
const int | xcenter, | ||
const int | ycenter, | ||
const int | radius | ||
) |
Returns a copy of a cpl_image with all pixels within a circle defined by the center coordinates and the radius are rejected (added to the bad pixel map), so that these pixels are not considered in further image processing steps
In order to have the center coordinate really in the center of the circle, the resulting diameter of the circle will be: radius * 2 - 1. So e.g. a radius of 25 will result in a circle diameter of 49.
The image has to be deleted using cpl_image_delete().
cpl_image * SubImageRect | ( | cpl_image * | image, |
int | llx, | ||
int | lly, | ||
int | urx, | ||
int | ury | ||
) |
Returns a CPL subimage from a cpl_image within a rectangle defined by two corners (coordinates of lower left and upper right corners)
Returns a CPL subimage from a cpl_image within a rectangle defined by two corners (coordinates of lower left and upper right corners)
The image has to be deleted using cpl_image_delete().
cpl_image * SubImageRect | ( | cpl_image * | image, |
std::tuple< int, int > | start, | ||
std::tuple< int, int > | end | ||
) |
Returns a CPL subimage from a cpl_image within a rectangle defined by two corners (tuples of image coordinates)
Returns a CPL subimage from a cpl_image within a rectangle defined by two corners (tuples of image coordinates)
The image has to be deleted using cpl_image_delete().
cpl_image * SubImageRectOutside | ( | const cpl_image *const | image, |
const int | llx, | ||
const int | lly, | ||
const int | urx, | ||
const int | ury | ||
) |
Returns a copy of a cpl_image with all pixels within a rectangle defined by two corners (coordinates of lower left and upper right corners) are rejected (added to the bad pixel map), so that these pixels are not considered in further image processing steps
The image has to be deleted using cpl_image_delete().