ddt 1.1.0
|
#include <imageHandling.hpp>
Public Types | |
enum | CutLevelType { AUTO , MINMAX , USERDEFINED } |
enum | ColorScalingType { LINEAR_SCALE , LOG_SCALE , SQRT_SCALE } |
Protected Attributes | |
ddt::DdtLogger * | logger |
ImageHandling () | |
virtual | ~ImageHandling () |
void | set_logger (ddt::DdtLogger *const in_logger) |
void | FreeResources () |
bool | LoadFile (const std::string &file_name, const int position=0) |
bool | LoadFilePlane (const std::string &file_name, const int position=0, const int plane=0) |
bool | LoadImageExtensionsAsOne (const std::string &file_name) |
void | set_CutLevelType (const CutLevelType in_cut_level_type) |
CutLevelType | get_CutLevelType () const |
std::string | get_CutLevelTypeStr () const |
bool | ApplyCutLevelsMinMax () |
bool | ApplyCutLevelsMinMax (const double lowerleftx, const double lowerlefty, const double upperrightx, const double upperrighty) |
bool | ApplyCutLevelsAuto () |
bool | ApplyCutLevelsAuto (const double lowerleftx, const double lowerlefty, const double upperrightx, const double upperrighty) |
bool | ApplyCutLevelsManual (const double min_value, const double max_value) |
bool | ResetCutLevels () |
void | AddCustomColorMaps (ddt::colorMap_t const &colourmap, ddt::colorMap_t const &colourmap_inverted, ddt::colorMapARGB_t const &colourmap_argb, ddt::colorMapARGB_t const &colourmap_argb_inverted) |
std::string | get_LastSelectedColourmapName () const |
bool | LoadColorMaps (const std::string color_map_folder, std::string color_map_name="standard") |
bool | LoadActualColorMap (std::string color_map_name) |
bool | LoadActualConfigurationMap (const std::string configuration_map_name) |
bool | LoadConfigurationMaps (const std::string configuration_map_source) |
bool | LoadInformationMaps (const std::string information_map_source) |
int | StoreActualImageAsBias (const std::string slot_name="") |
bool | StoreActualImageAsBiasInSlot (const std::string slot_name, const int slot) |
int | LoadFileAsBias (const std::string file_name) |
bool | LoadFileAsBiasInSlot (const std::string file_name, const int slot) |
std::string | GetBiasSlotName (const int slot) |
bool | GetBiasEnabled () const |
void | EnableBias (const bool enable_bias) |
void | ApplyBias (const int slot) |
int | GetCurrentSelectedBiasSlot () const |
void | ClearAllBiasImages () |
void | ClearSelectedBiasImage (const int slot) |
void | DisplaySelectedBiasImage (const int slot) |
int | get_CurrentPlane () const |
void | set_CurrentPlane (const int plane) |
void | set_RotateFlag (const bool rot_flag) |
bool | get_RotateFlag () const |
void | set_FlipXFlag (const bool flip_flag) |
bool | get_FlipXFlag () const |
void | set_FlipYFlag (const bool flip_flag) |
bool | get_FlipYFlag () const |
void * | get_ImageData () |
cpl_image * | get_Image () |
cpl_table * | get_BinaryTable () |
int | get_ImageWidth () const |
int | get_ImageHeight () const |
int | get_NumberExtensions () |
int | get_NumberAxis () const |
int | get_NumberPlanes () const |
bool | get_LastSegment () const |
std::string | get_Timestamp () const |
FitsExtension * | get_FitsExtensionInfo (const int extension_number) |
FitsExtension | get_PrimaryHDUInfo () const |
std::shared_ptr< DdtEncDec > | get_MetadataSample () |
bool | get_ImageRotation (double *const rotation_angle) const |
void | set_CutLevelMin (const double min_value) |
void | set_CutLevelMax (const double max_value) |
double | get_CutLevelMin () const |
double | get_CutLevelMax () const |
double | get_ImagePixelMin () const |
double | get_ImagePixelMax () const |
int | get_ImageBitsPerPixel () const |
std::list< std::string > | get_ColorMaps () const |
ddt::colorMap_t * | get_ActualColorMap () |
ddt::colorMapARGB_t * | get_ActualColorMapARGB () |
std::string | get_ActualColorMapName () const |
ddt::scalingLut_t * | get_ScalingLut () |
ddt::scalingLut_t * | get_LinearScalingLut () |
ddt::scalingLut_t * | get_LogarithmicScalingLut () |
ddt::scalingLut_t * | get_SqrtScalingLut () |
ColorScalingType | get_ColorScalingType () const |
void | set_ColorScalingTypeLinear () |
void | set_ColorScalingTypeLogarithmic () |
void | set_ColorScalingTypeSquareRoot () |
void | set_ColorScalingType (const ColorScalingType scaling_type) |
void | set_InvertColourmap (const bool invert) |
std::string | get_ColorScalingTypeStr () const |
double | ImagePixelFromImage (const double x_image, double y_image) |
double | ImagePixelFromCanvas (const double x_canvas, const double y_canvas, double *const x_image, double *const y_image) |
void | ConvertCanvasToImage (const double x_canvas, const double y_canvas, double *const x_image, double *const y_image) const |
void | ConvertImageToCanvas (const double x_image, const double y_image, double *const x_canvas, double *const y_canvas) const |
bool | WorldCoordinatesDegreesFromImage (const double x_image, const double y_image, double *alpha, double *delta) const |
bool | ImageCoordinatesFromWorldCoordinatesDegrees (const double alpha, const double delta, double *const x_image, double *const y_image) const |
bool | WorldCoordinatesDegreesFromCanvas (const double x_canvas, const double y_canvas, double *alpha, double *delta) |
bool | CanvasCoordinatesFromWorldCoordinatesDegrees (const double alpha, const double delta, double *const x_canvas, double *const y_canvas) |
CplStatistics * | GetStatisticsCplImageWindow (int llx, int lly, int urx, int ury) |
bool | get_ConfigurationMap_Value (const double x, const double y, double *const value) const |
std::list< std::string > | get_TextInformation (const double x, const double y) const |
bool | get_AttachedToStream () const |
ddt::DdtStatistics * | get_DataStatistics () |
void | set_RetrieveStatsFlag (bool value) |
bool | ReprocessImage () |
void | GetHistogramFromImage (const int64_t min_value, const int64_t max_value, std::vector< int > &distribution) const |
void | GetHistogramBinsFromImage (const int64_t min_value, const int64_t max_value, std::vector< int > &distribution) const |
void | GetCutValuesPercentageFromImage (const double percentage, double *const min_value, double *const max_value) const |
void | AttachDataStream (const std::string data_stream_id) |
void | DetachDataStream (const std::string data_stream_id) |
cpl_apertures * | GetCircularObjects (const double sigma) |
bool | GetObjectCentroidPos (const cpl_apertures *const apertures, const double x_image, const double y_image, double *const x_centroid, double *const y_centroid) const |
bool | GetObjectInformation (const double x_image, const double y_image, const int size, double *const x_axis_angle, double *const background, double *const peak_above_background, double *const fwhm_x, double *const fwhm_y, double *const object_coord_x, double *const object_coord_y) |
bool | GetGaussianParameters (const double x_image, const double y_image, const int size, double *const background, double *const gaussian_volume, double *const correlation, double *const gaussian_coord_x, double *const gaussian_coord_y, double *const sigma_x, double *const sigma_y) |
std::string | GetEquinox () |
SignalT * | ImageAvailableInBufferSignal () |
SignalT * | CutLevelChangedSignal () |
std::vector< std::string > | GetPrimaryFITSHeader () |
std::vector< std::vector< std::string > > | GetExtensionsFITSHeader () |
cpl_propertylist * | GetPropertyList () |
double | GetPixelToDegreesScalingFactor () |
double | GetImagePixelDistance (const double startx, const double starty, const double endx, const double endy, double *const xoffset=nullptr, double *const yoffset=nullptr) const |
double | GetImagePixelDistanceDegrees (const double startx, const double starty, const double endx, const double endy, double *const xoffsetdeg=nullptr, double *const yoffsetdeg=nullptr) |
std::vector< int > | get_invalid_image_hdus () const |
Class to wrap the usage of image handling functions.
This class allows to load a data file or attach to a data stream. It offers access to image properties and the possibility to process the image data (e.g. flip / rotate etc.).
To distinguish between color scaling types.
ImageHandling::ImageHandling | ( | ) |
Constructor
|
virtual |
Destructor
void ImageHandling::AddCustomColorMaps | ( | ddt::colorMap_t const & | colourmap, |
ddt::colorMap_t const & | colourmap_inverted, | ||
ddt::colorMapARGB_t const & | colourmap_argb, | ||
ddt::colorMapARGB_t const & | colourmap_argb_inverted | ||
) |
Adds a custom color map and stores it as actual color map.
colour_map | the custom colourmap |
colourmap_inverted | the inverted custom colourmap |
colourmap_argb | the custom colourmap with alpha channel |
colourmap_argb_inverted | the custom colourmap with alpha channel |
void ImageHandling::ApplyBias | ( | const int | slot | ) |
Apply the BIAS identified by the slot number on the current image
slot | the BIAS slot number (starting with 0) |
bool ImageHandling::ApplyCutLevelsAuto | ( | ) |
Apply cut levels based on the median filtered image's min/max values
bool ImageHandling::ApplyCutLevelsAuto | ( | const double | lowerleftx, |
const double | lowerlefty, | ||
const double | upperrightx, | ||
const double | upperrighty | ||
) |
Apply cut levels based on the median filtered sub-image's min/max values. The sub-image is the part of the image covered by the rectangle that is specified by the lower left and upper right corners image pixel coordinate arguments.
lowerleftx | the x coordinate of the lower left corner of the sub-image |
lowerlefty | the y coordinate of the lower left corner of the sub-image |
upperrightx | the x coordinate of the upper right corner of the sub-image |
upperrighty | the y coordinate of the upper right corner of the sub-image |
bool ImageHandling::ApplyCutLevelsManual | ( | const double | min_value, |
const double | max_value | ||
) |
Apply cut levels based manually
bool ImageHandling::ApplyCutLevelsMinMax | ( | ) |
Apply cut levels based on the image min/max values
bool ImageHandling::ApplyCutLevelsMinMax | ( | const double | lowerleftx, |
const double | lowerlefty, | ||
const double | upperrightx, | ||
const double | upperrighty | ||
) |
Apply cut levels based on a sub-image min/max values. The sub-image is the part of the image covered by the rectangle that is specified by the lower left and upper right corners image pixel coordinate arguments.
lowerleftx | the x coordinate of the lower left corner of the sub-image |
lowerlefty | the y coordinate of the lower left corner of the sub-image |
upperrightx | the x coordinate of the upper right corner of the sub-image |
upperrighty | the y coordinate of the upper right corner of the sub-image |
void ImageHandling::AttachDataStream | ( | const std::string | data_stream_id | ) |
Attach to a data stream
data_stream_id | The ID of the data stream (could be the URI) |
bool ImageHandling::CanvasCoordinatesFromWorldCoordinatesDegrees | ( | const double | alpha, |
const double | delta, | ||
double *const | x_canvas, | ||
double *const | y_canvas | ||
) |
Get the canvas coordinates from the world coordinates in degrees
alpha | the world coordinates alpha value |
delta | the world coordinates delta value |
x_canvas | the resulting canvas x position |
y_canvas | the resulting canvas y position |
void ImageHandling::ClearAllBiasImages | ( | ) |
Clear all BIAS images.
void ImageHandling::ClearSelectedBiasImage | ( | const int | slot | ) |
Clear the selected BIAS image, identified by its slot number
slot | the BIAS slot number (starting with 0) |
void ImageHandling::ConvertCanvasToImage | ( | const double | x_canvas, |
const double | y_canvas, | ||
double *const | x_image, | ||
double *const | y_image | ||
) | const |
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 ImageHandling::ConvertImageToCanvas | ( | const double | x_image, |
const double | y_image, | ||
double *const | x_canvas, | ||
double *const | y_canvas | ||
) | const |
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 |
SignalT * ImageHandling::CutLevelChangedSignal | ( | ) |
Provide the cut level changed signal
void ImageHandling::DetachDataStream | ( | const std::string | data_stream_id | ) |
Detach from a data stream
data_stream_id | The ID of the stream to be disconnected |
void ImageHandling::DisplaySelectedBiasImage | ( | const int | slot | ) |
Displax the selected BIAS image, identified by its slot number
slot | the BIAS slot number (starting with 0) |
void ImageHandling::EnableBias | ( | const bool | enable_bias | ) |
Enable BIAS processing. If enabled, the currently selected BIAS image will be subtracted from each new image.
enable_bias | flag indicating if BIAS processing shall be enabled |
void ImageHandling::FreeResources | ( | ) |
ddt::colorMap_t * ImageHandling::get_ActualColorMap | ( | ) |
Get the actual color map
ddt::colorMapARGB_t * ImageHandling::get_ActualColorMapARGB | ( | ) |
Get the actual color map as ARGB value array
std::string ImageHandling::get_ActualColorMapName | ( | ) | const |
Get the name of the current colourmap
bool ImageHandling::get_AttachedToStream | ( | ) | const |
Get the attached to stream flag from the data acquisition
cpl_table * ImageHandling::get_BinaryTable | ( | ) |
Get the binary table data
std::list< std::string > ImageHandling::get_ColorMaps | ( | ) | const |
Get the list of loaded color maps
ImageHandling::ColorScalingType ImageHandling::get_ColorScalingType | ( | ) | const |
Get the color scalingtype.
std::string ImageHandling::get_ColorScalingTypeStr | ( | ) | const |
Get a string representaiton of the color scaling type.
bool ImageHandling::get_ConfigurationMap_Value | ( | const double | x, |
const double | y, | ||
double *const | value | ||
) | const |
Get the value from a configuration map located at the specified x/y coordinate.
x | the x coordinate |
y | the y coordinate |
value | the value at the specified coordinate, or 0.0 in case of error |
int ImageHandling::get_CurrentPlane | ( | ) | const |
Get the currently selected plane.
double ImageHandling::get_CutLevelMax | ( | ) | const |
Get the cut level maximum
double ImageHandling::get_CutLevelMin | ( | ) | const |
Get the cut level minimum
ImageHandling::CutLevelType ImageHandling::get_CutLevelType | ( | ) | const |
Get the cut level type.
std::string ImageHandling::get_CutLevelTypeStr | ( | ) | const |
Get a string representation of the cut level type.
ddt::DdtStatistics * ImageHandling::get_DataStatistics | ( | ) |
Get statistics data sample from current subscriber
FitsExtension * ImageHandling::get_FitsExtensionInfo | ( | const int | extension_number | ) |
Get the information about one file extension
extension_number | the extension number |
bool ImageHandling::get_FlipXFlag | ( | ) | const |
Get the flip X flag.
bool ImageHandling::get_FlipYFlag | ( | ) | const |
Get the flip Y flag.
cpl_image * ImageHandling::get_Image | ( | ) |
Get the image data
int ImageHandling::get_ImageBitsPerPixel | ( | ) | const |
Get the image bits per pixel
void * ImageHandling::get_ImageData | ( | ) |
Get the image data
int ImageHandling::get_ImageHeight | ( | ) | const |
Get the image height
double ImageHandling::get_ImagePixelMax | ( | ) | const |
Get the image pixel maximum
double ImageHandling::get_ImagePixelMin | ( | ) | const |
Get the image pixel minimum
bool ImageHandling::get_ImageRotation | ( | double *const | rotation_angle | ) | const |
Get the rotation angle (in degrees) as calculated from the CD matrix contained in the WCS image data
rotation_angle | the calculated rotation angle, or -1.0 in case of error |
int ImageHandling::get_ImageWidth | ( | ) | const |
Get the image width
std::vector< int > ImageHandling::get_invalid_image_hdus | ( | ) | const |
Get the information about invalid image HDUs
bool ImageHandling::get_LastSegment | ( | ) | const |
Get the last segment flag
std::string ImageHandling::get_LastSelectedColourmapName | ( | ) | const |
Returns the name of the last colourmap selected within the colourmap dialog.
ddt::scalingLut_t * ImageHandling::get_LinearScalingLut | ( | ) |
Get the LUT for linear color scaling
ddt::scalingLut_t * ImageHandling::get_LogarithmicScalingLut | ( | ) |
Get the LUT for logarithmic color scaling
std::shared_ptr< DdtEncDec > ImageHandling::get_MetadataSample | ( | ) |
Get image metadata infomation
int ImageHandling::get_NumberAxis | ( | ) | const |
Get the number of axis
int ImageHandling::get_NumberExtensions | ( | ) |
Get the number of extensions
int ImageHandling::get_NumberPlanes | ( | ) | const |
Get the number of planes
FitsExtension ImageHandling::get_PrimaryHDUInfo | ( | ) | const |
Get the information about the primary HDU
bool ImageHandling::get_RotateFlag | ( | ) | const |
Get the rotate flag.
ddt::scalingLut_t * ImageHandling::get_ScalingLut | ( | ) |
Get the scaling LUT, depending on the current scaling type
ddt::scalingLut_t * ImageHandling::get_SqrtScalingLut | ( | ) |
Get the LUT for square root color scaling
std::list< std::string > ImageHandling::get_TextInformation | ( | const double | x, |
const double | y | ||
) | const |
Get the textual information contained in a configuration text info file related to a certain position
x | the x coordinate |
y | the y coordinate |
std::string ImageHandling::get_Timestamp | ( | ) | const |
Get last timestamp
bool ImageHandling::GetBiasEnabled | ( | ) | const |
Get the flag indicating whether bias processing is enabled
std::string ImageHandling::GetBiasSlotName | ( | const int | slot | ) |
Get the slot name associated to a certain slot number
slot | the slot number (starting with 0) |
cpl_apertures * ImageHandling::GetCircularObjects | ( | const double | sigma | ) |
Get a list of objects from a CPL image
sigma | the detection level |
int ImageHandling::GetCurrentSelectedBiasSlot | ( | ) | const |
Get the currently selected BIAS slot
void ImageHandling::GetCutValuesPercentageFromImage | ( | const double | percentage, |
double *const | min_value, | ||
double *const | max_value | ||
) | const |
std::string ImageHandling::GetEquinox | ( | ) |
Return the current equinox information related to the image, if available
std::vector< std::vector< std::string > > ImageHandling::GetExtensionsFITSHeader | ( | ) |
Get all Extension FITS header as a vector of strings
bool ImageHandling::GetGaussianParameters | ( | const double | x_image, |
const double | y_image, | ||
const int | size, | ||
double *const | background, | ||
double *const | gaussian_volume, | ||
double *const | correlation, | ||
double *const | gaussian_coord_x, | ||
double *const | gaussian_coord_y, | ||
double *const | sigma_x, | ||
double *const | sigma_y | ||
) |
Get parameters from 2D gaussian fit
x_image | the image x position |
y_image | the image y position |
size | the size of the rectangle around the image position to consider |
background | the background level, or 0.0 on error |
gaussian_volume | the gaussian volumne, or 0.0 on error |
correlation | the correlation, or 0.0 on error |
gaussian_coord_x | the x coordinate of the mid of the gaussian fit |
gaussian_coord_y | the y coordinate of the mid of the gaussian fit |
sigma_x | the variance of gaussian fit in x direction |
sigma_y | the variance of gaussian fit in y direction |
void ImageHandling::GetHistogramBinsFromImage | ( | const int64_t | min_value, |
const int64_t | max_value, | ||
std::vector< int > & | distribution | ||
) | const |
void ImageHandling::GetHistogramFromImage | ( | const int64_t | min_value, |
const int64_t | max_value, | ||
std::vector< int > & | distribution | ||
) | const |
double ImageHandling::GetImagePixelDistance | ( | const double | startx, |
const double | starty, | ||
const double | endx, | ||
const double | endy, | ||
double *const | xoffset = nullptr , |
||
double *const | yoffset = nullptr |
||
) | const |
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 ImageHandling::GetImagePixelDistanceDegrees | ( | const double | startx, |
const double | starty, | ||
const double | endx, | ||
const double | endy, | ||
double *const | xoffsetdeg = nullptr , |
||
double *const | yoffsetdeg = nullptr |
||
) |
Returns the pixel distance in degrees between two pixels, provided with their x and y coordinates. In addition, the x- and y-offset is returned. This uses the pixel scaling factor as provided in the CPL property list
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 [degrees] |
yoffsetdeg | if provided and no nullptr, will contain the offset in y direction [degrees] |
bool ImageHandling::GetObjectCentroidPos | ( | const cpl_apertures *const | apertures, |
const double | x_image, | ||
const double | y_image, | ||
double *const | x_centroid, | ||
double *const | y_centroid | ||
) | const |
Find an aperture object that matches certain image coordinates and return the centroid position
apertures | list of cpl_apertures objects |
x_image | the image x position |
y_image | the image y position |
x_centroid | the centroid x coordinate, or -1.0 on error |
y_centroid | the centroid y coordinate, or -1.0 on error |
bool ImageHandling::GetObjectInformation | ( | const double | x_image, |
const double | y_image, | ||
const int | size, | ||
double *const | x_axis_angle, | ||
double *const | background, | ||
double *const | peak_above_background, | ||
double *const | fwhm_x, | ||
double *const | fwhm_y, | ||
double *const | object_coord_x, | ||
double *const | object_coord_y | ||
) |
Get information about an aperture object
x_image | the image x position |
y_image | the image y position |
size | the size of the rectangle around the image position to consider |
x_axis_angle | the angle of the x_axis (degrees), or 0.0 on error |
background | the background level, or 0.0 on error |
peak_above_background | the peak above background value, or 0.0 on error |
fwhm_x | the FWHM along the x axis, or -1.0 on error |
fwhm_y | the FWHM along the y axis, or -1.0 on error |
object_coord_x | x coordinate of the center of the detected object |
object_coord_y | y coordinate of the center of the detected object |
double ImageHandling::GetPixelToDegreesScalingFactor | ( | ) |
Calculate and return the factor needed to convert pixel distances to degrees The needed information is taken from the FITS header items, if available
std::vector< std::string > ImageHandling::GetPrimaryFITSHeader | ( | ) |
Get the Primary FITS header items as a vector of strings
cpl_propertylist * ImageHandling::GetPropertyList | ( | ) |
Get the FITS header property list as a cpl_propertylist object
CplStatistics * ImageHandling::GetStatisticsCplImageWindow | ( | int | llx, |
int | lly, | ||
int | urx, | ||
int | ury | ||
) |
Get statistics from CPL internal image sub-window
llx | lower left x position (1: leftmost) |
lly | lower left y position (1: lowest) |
urx | upper right x position |
ury | upper right y position |
SignalT * ImageHandling::ImageAvailableInBufferSignal | ( | ) |
Provide the image available in buffer signal
bool ImageHandling::ImageCoordinatesFromWorldCoordinatesDegrees | ( | const double | alpha, |
const double | delta, | ||
double *const | x_image, | ||
double *const | y_image | ||
) | const |
Get the image coordinates from world coordinates in degrees
alpha | world coordinates alpha value |
delta | world coordinates delta value |
x_image | the resulting image x position, or 0.0 on error |
y_image | the resulting image y position, or 0.0 on error |
double ImageHandling::ImagePixelFromCanvas | ( | const double | x_canvas, |
const double | y_canvas, | ||
double *const | x_image, | ||
double *const | y_image | ||
) |
Get the image pixel value from the position expressed as canvas 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 |
double ImageHandling::ImagePixelFromImage | ( | const double | x_image, |
double | y_image | ||
) |
Get the image pixel value from the position expressed as image coordinates
x_image | the image x position |
y_image | the image y position |
bool ImageHandling::LoadActualColorMap | ( | std::string | color_map_name | ) |
Load the supplied color map as actual color map.
color_map_name | the name of the color map to be loaded. The color map names are derived from the color map file names. |
bool ImageHandling::LoadActualConfigurationMap | ( | const std::string | configuration_map_name | ) |
Load the supplied configuration map as the actual configuration map.
configuration_map_name | the name of the configuration map to be loaded. |
bool ImageHandling::LoadColorMaps | ( | const std::string | color_map_folder, |
std::string | color_map_name = "standard" |
||
) |
Load the color maps from the specified folder into the color_maps member. If possible, the supplied color map is then loaded as the actual color map.
color_map_folder | the folder containing color map files. These files (with extension .lut or .lasc) should contain 256 RGB triples (in the form: r.rrrr g.gggg b.bbbb, where each value is in the range 0.0 and 1.0). |
color_map_name | the name of the color map to be loaded. The color map names are derived from the color map file names. |
bool ImageHandling::LoadConfigurationMaps | ( | const std::string | configuration_map_source | ) |
Load the configuration maps from the specified configuration map source.
configuration_map_source | the source of the configuration maps |
bool ImageHandling::LoadFile | ( | const std::string & | file_name, |
const int | position = 0 |
||
) |
Load file. This function takes a CPL file (FITS) name and a position. The position indicates the HDU to use. The default HDU is the first (position 0).
file_name | the FITS file name to load |
position | the position indicating the HDU to use. This defaults to 0 (the first HDU). |
int ImageHandling::LoadFileAsBias | ( | const std::string | file_name | ) |
Load a file from disc as BIAS image
file_name | the name of the file to load as BIAS image |
bool ImageHandling::LoadFileAsBiasInSlot | ( | const std::string | file_name, |
const int | slot | ||
) |
Load a file from disc as BIAS image in certain slot
file_name | the name of the file to load as BIAS image |
slot | the slot number (starting with 0) |
bool ImageHandling::LoadFilePlane | ( | const std::string & | file_name, |
const int | position = 0 , |
||
const int | plane = 0 |
||
) |
Load certain plain from a 3D cube CPL file.
file_name | the FITS file name to load |
position | the position indicating the HDU to use. This defaults to 0 (the first HDU). |
plane | the plane of the HDU to load. This defaults to 0. |
bool ImageHandling::LoadImageExtensionsAsOne | ( | const std::string & | file_name | ) |
Load all image extensions from a CPL file into one cpl_image.
file_name | the FITS file name to load |
bool ImageHandling::LoadInformationMaps | ( | const std::string | information_map_source | ) |
Load the information maps from the specified information map source.
information_map_source | the source of the information maps |
bool ImageHandling::ReprocessImage | ( | ) |
Apply all processing flags and cut levels on the image
bool ImageHandling::ResetCutLevels | ( | ) |
Reset cut levels
void ImageHandling::set_ColorScalingType | ( | const ColorScalingType | scaling_type | ) |
Set the actual color scaling type
scaling_type | the scaling type to be set |
void ImageHandling::set_ColorScalingTypeLinear | ( | ) |
Set the scaling type to LINEAR_SCALE.
void ImageHandling::set_ColorScalingTypeLogarithmic | ( | ) |
Set the scaling type to LOG_SCALE.
void ImageHandling::set_ColorScalingTypeSquareRoot | ( | ) |
Set the scaling type to SQRT_SCALE.
void ImageHandling::set_CurrentPlane | ( | const int | plane | ) |
Set the plane to be loaded.
plane | the plane number |
void ImageHandling::set_CutLevelMax | ( | const double | max_value | ) |
Set the cut level maximum
void ImageHandling::set_CutLevelMin | ( | const double | min_value | ) |
Set the cut level minimum
void ImageHandling::set_CutLevelType | ( | const CutLevelType | in_cut_level_type | ) |
Set the cut level type.
void ImageHandling::set_FlipXFlag | ( | const bool | flip_flag | ) |
Set the flip X flag.
void ImageHandling::set_FlipYFlag | ( | const bool | flip_flag | ) |
Set the flip Y flag.
void ImageHandling::set_InvertColourmap | ( | const bool | invert | ) |
Set if colourmap should get inverted
invert | sets if colourmap should get inverted |
void ImageHandling::set_logger | ( | ddt::DdtLogger *const | in_logger | ) |
Set logger
in_logger | The logger object |
void ImageHandling::set_RetrieveStatsFlag | ( | bool | value | ) |
Enable or Disables subscriber statistics
value | Flag to read statitics |
void ImageHandling::set_RotateFlag | ( | const bool | rot_flag | ) |
Set the rotate flag.
int ImageHandling::StoreActualImageAsBias | ( | const std::string | slot_name = "" | ) |
Stores the actually displayed image as BIAS image
slot_name | name to assign to the slot Should be the filename in case of storing a selected file Defaults to empty string, in which case a slot name will be automatically set |
bool ImageHandling::StoreActualImageAsBiasInSlot | ( | const std::string | slot_name, |
const int | slot | ||
) |
Stores the actually displayed image as BIAS image in certain slot
slot_name | name to assign to the slot Should be the filename in case of storing a selected file Defaults to empty string, in which case a slot name will be automatically set |
slot | the slot number (starting with 0) |
bool ImageHandling::WorldCoordinatesDegreesFromCanvas | ( | const double | x_canvas, |
const double | y_canvas, | ||
double * | alpha, | ||
double * | delta | ||
) |
Get the world coordinates in degrees from canvas coordinates
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 ImageHandling::WorldCoordinatesDegreesFromImage | ( | const double | x_image, |
const double | y_image, | ||
double * | alpha, | ||
double * | delta | ||
) | const |
Get the world coordinates in degrees from image coordinates
x_image | the image x position |
y_image | the image y position |
alpha | the resulting world coordinates alpha value |
delta | the resulting world coordinates delta value |
|
protected |
The logger object