|
ddt
0.1
|
#include <imageCoords.hpp>
Public Member Functions | |
| ImageCoords (int image_width, int image_height, bool rotate_flag, bool flip_x_flag, bool flip_y_flag) | |
| virtual | ~ImageCoords ()=default |
| void | set_logger (ddt::DdtLogger *logger) |
| bool | WorldCoordinatesDegreesFromCanvas (cpl_wcs *wcs, const double x_canvas, const double y_canvas, double *alpha, double *delta) |
| bool | WorldCoordinatesDegreesFromImage (const cpl_wcs *wcs, const double x_image, const double y_image, double *alpha, double *delta) |
| const cpl_matrix * | WorldCoordinatesCdMatrix (const cpl_wcs *wcs) |
| void | ConvertCanvasToImage (const double x_canvas, const double y_canvas, double *x_image, double *y_image) |
| void | ConvertImageToCanvas (const double x_image, const double y_image, double *x_canvas, double *y_canvas) |
| void | set_RotateFlag (const bool rot_flag) |
| bool | get_RotateFlag () |
| void | set_FlipXFlag (const bool flip_flag) |
| bool | get_FlipXFlag () |
| void | set_FlipYFlag (const bool flip_flag) |
| bool | get_FlipYFlag () |
| int | get_ImageWidth () |
| void | set_ImageWidth (const int image_width) |
| int | get_ImageHeight () |
| void | set_ImageHeight (const int image_height) |
Static Public Member Functions | |
| static std::string | RaDegToHMS (double deg) |
| static std::string | DecDegToDMS (double deg) |
Protected Attributes | |
| ddt::DdtLogger * | logger |
This file is part of the DDT Image Handling Library and provides functions for coordinate conversion purposes.
It offers functions to convert canvas coordinates to image coordinates and to retrieve world coordinates from canvas coordinates.
| ImageCoords::ImageCoords | ( | int | image_width, |
| int | image_height, | ||
| bool | rotate_flag, | ||
| bool | flip_x_flag, | ||
| bool | flip_y_flag | ||
| ) |
Constructor
|
virtualdefault |
Destructor
| void ImageCoords::ConvertCanvasToImage | ( | const double | x_canvas, |
| const double | y_canvas, | ||
| double * | x_image, | ||
| double * | y_image | ||
| ) |
Converts canvas coordinates to image coordinates
| x_canvas | the canvas x position |
| y_canvas | the canvas y position |
| x_image | the resulting image x position |
| y_image | the resulting image y position |
| void ImageCoords::ConvertImageToCanvas | ( | const double | x_image, |
| const double | y_image, | ||
| double * | x_canvas, | ||
| double * | y_canvas | ||
| ) |
Converts image coordinates to canvas coordinates
| x_image | the image x position |
| y_image | the image y position |
| x_canvas | the resulting canvas x position |
| y_canvas | the resulting canvas y position |
|
static |
Get declination from degrees as a +D:M:S string representation
| deg | the declination in degrees |
| bool ImageCoords::get_FlipXFlag | ( | ) |
Get the flip X flag.
| bool ImageCoords::get_FlipYFlag | ( | ) |
Get the flip Y flag.
| int ImageCoords::get_ImageHeight | ( | ) |
Get the image height
| int ImageCoords::get_ImageWidth | ( | ) |
Get the image width
| bool ImageCoords::get_RotateFlag | ( | ) |
Get the rotate flag.
|
static |
Get right ascension from degrees as a H:M:S string representation
| deg | the right ascension in degrees |
| void ImageCoords::set_FlipXFlag | ( | const bool | flip_flag | ) |
Set the flip X flag.
| flip_flag | the flip x flag to set |
| void ImageCoords::set_FlipYFlag | ( | const bool | flip_flag | ) |
Set the flip Y flag.
| flip_flag | the flip y flag to set |
| void ImageCoords::set_ImageHeight | ( | const int | image_height | ) |
Set the image height
| image_height | the image height to set |
| void ImageCoords::set_ImageWidth | ( | const int | image_width | ) |
Set the image width
| image_width | the image width to set |
| void ImageCoords::set_logger | ( | ddt::DdtLogger * | logger | ) |
Set logger
| logger | The logger object |
| void ImageCoords::set_RotateFlag | ( | const bool | rot_flag | ) |
Set the rotate flag.
| rot_flag | the rotate flag to set |
| const cpl_matrix * ImageCoords::WorldCoordinatesCdMatrix | ( | const cpl_wcs * | wcs | ) |
Get the CD matrix from the WCS data.
| bool ImageCoords::WorldCoordinatesDegreesFromCanvas | ( | cpl_wcs * | wcs, |
| const double | x_canvas, | ||
| const double | y_canvas, | ||
| double * | alpha, | ||
| double * | delta | ||
| ) |
Get the world coordinates in degrees from canvas coordinates
| wcs | the WCS object related to the image |
| x_canvas | the canvas x position |
| y_canvas | the canvas y position |
| alpha | the resulting world coordinates alpha value |
| delta | the resulting world coordinates delta value |
| bool ImageCoords::WorldCoordinatesDegreesFromImage | ( | const cpl_wcs * | wcs, |
| const double | x_image, | ||
| const double | y_image, | ||
| double * | alpha, | ||
| double * | delta | ||
| ) |
Get the world coordinates in degrees from image coordinates
| wcs | the cpl_wcs object, containing the WCS information related to a CPL image |
| x_image | the image x position |
| y_image | the image y position |
| alpha | the resulting world coordinates alpha value, or 0.0 on error |
| delta | the resulting world coordinates delta value, or 0.0 on error |
|
protected |
The logger object