Class DisplayerFunctional
ClassList > DisplayerFunctional
The DisplayerFunctional class is responsible for displaying images.More...
#include <displayFunctional.h>
Inherits the following classes: Displayer
Public Attributes
| Type | Name |
|---|---|
| QString | m_cameraModel Camera model used to identify camera properties. |
| QString | m_cameraType = CAMERA\_TYPE\_SPECTRALType of camera being used: spectral, gray, etc. |
| cv::Mat | m_lut = /* multi line expression */Look up table used to assign pixel colors to undersaturated and oversaturated pixels. |
| std::vector< int > | m_mosaicShape Mosaic shape, particularly used for mosaic type cameras. |
Public Attributes inherited from Displayer
See Displayer
| Type | Name |
|---|---|
| QString | m_cameraType Stores the type or model of the camera currently used. |
Public Slots
| Type | Name |
|---|---|
| slot void | Display (XI_IMG & image) Qt slot used to display images whenever a new image is queried from the camera. |
| slot void | OnDisplayTimeout Qt slot that triggers the process to display image once the timer has run out. |
Public Slots inherited from Displayer
See Displayer
| Type | Name |
|---|---|
| slot void | Display (XI_IMG & image) Qt slot in charge of displaying images. |
Public Signals inherited from Displayer
See Displayer
| Type | Name |
|---|---|
| signal void | ImageReadyToUpdateRGB (QImage) Qt signal emitted when an RGB image is ready to be displayed in the UI. |
| signal void | ImageReadyToUpdateRaw (QImage) Qt signal emitted when a raw image is ready to be displayed in the UI. |
| signal void | SaturationPercentageReady (double undersaturation, double oversaturation) Qt signal emitted when the saturation values are ready to be displayed in the UI. |
Public Functions
| Type | Name |
|---|---|
| DisplayerFunctional (MainWindow * mainWindow) Constructor of functional displayer. |
|
| DisplayerFunctional () Constructor of functional displayer. |
|
| virtual void | SetCameraProperties (QString cameraModel) override Assigns camera properties such as type and mosaic shape. |
| virtual void | UpdateBGRChannels (const std::vector< int > & bgrChannels) override Updates the BGR channel values for the displayer. |
| virtual void | UpdateLut (int minValue, int maxValue, const QColor & darkColor, const QColor & saturatedColor) override Updates the lookup table (LUT) with the specified minimum and maximum values. |
| ~DisplayerFunctional () override Destructor of the DisplayerFunctional class. It destroys the windows created by the displayer. |
Public Functions inherited from Displayer
See Displayer
| Type | Name |
|---|---|
| Displayer (QObject * parent=nullptr) |
|
| virtual void | SetCameraProperties (QString cameraModel) = 0 Configures the camera properties based on the provided camera model. |
| void | StartDisplayer () Allows to start or continue displaying images. |
| void | StopDisplayer () Blocks the display of images. |
| virtual void | UpdateBGRChannels (const std::vector< int > & bgrChannels) Updates the BGR channel values for the displayer. |
| virtual void | UpdateLut (int minValue, int maxValue, const QColor & darkColor, const QColor & saturatedColor) Updates the lookup table (LUT) with the specified minimum and maximum values. |
| ~Displayer () override |
Public Static Functions
| Type | Name |
|---|---|
| void | DownsampleImageIfNecessary (cv::Mat & image) Down-samples image in case it is bigger than maximum dimensions. |
Protected Attributes
| Type | Name |
|---|---|
| MainWindow * | m_mainWindow = {}reference to the main window, necessary to read UI element values. |
Protected Attributes inherited from Displayer
See Displayer
| Type | Name |
|---|---|
| QColor | m_darkColor The color used to highlight underexposed regions of the image. |
| boost::condition_variable | m_displayCondition Condition variable used to wait until a new image is available to be processed. |
| QColor | m_saturatedColor |
| bool | m_stop = falseIndicate that process should stop displaying images. |
Detailed Description
It inherits from the Displayer class and uses the MainWindow class for reference. It displays the raw, RGB and functional estimated images based on the images collected from the camera.
Public Attributes Documentation
variable m_cameraModel
Camera model used to identify camera properties.
variable m_cameraType
Type of camera being used: spectral, gray, etc.
variable m_lut
Look up table used to assign pixel colors to undersaturated and oversaturated pixels.
variable m_mosaicShape
Mosaic shape, particularly used for mosaic type cameras.
Public Slots Documentation
slot Display
Qt slot used to display images whenever a new image is queried from the camera.
When a new image arrives, it is stored in the a member variable and it sets a flag to indicate that a new image is ready for processing.
Parameters:
imageimage to be displayed
slot OnDisplayTimeout
Qt slot that triggers the process to display image once the timer has run out.
Public Functions Documentation
function DisplayerFunctional [1/2]
Constructor of functional displayer.
Parameters:
mainWindowreference to main window application
function DisplayerFunctional [2/2]
Constructor of functional displayer.
function SetCameraProperties
Assigns camera properties such as type and mosaic shape.
Parameters:
cameraModelcamera type to set
Implements Displayer::SetCameraProperties
function UpdateBGRChannels
Updates the BGR channel values for the displayer.
virtual void DisplayerFunctional::UpdateBGRChannels (
const std::vector< int > & bgrChannels
) override
This method is used to set the values of the Blue, Green, and Red channels for processing or rendering purposes. The values provided in the input parameter define the specific intensities or configurations for each channel.
Parameters:
bgrChannelsA vector containing the values for the Blue, Green, and Red channels, typically in the order [Blue, Green, Red].
Implements Displayer::UpdateBGRChannels
function UpdateLut
Updates the lookup table (LUT) with the specified minimum and maximum values.
virtual void DisplayerFunctional::UpdateLut (
int minValue,
int maxValue,
const QColor & darkColor,
const QColor & saturatedColor
) override
This method adjusts the LUT range to enhance or modify the image display settings based on the given values. It allows flexibility in defining the lower and upper bounds of the LUT.
Parameters:
minValueThe minimum value for the LUT.maxValueThe maximum value for the LUT.darkColorThe color used to highlight underexposed regions of the image.saturatedColorThe color used to highlight overexposed regions of the image.
Implements Displayer::UpdateLut
function ~DisplayerFunctional
Destructor of the DisplayerFunctional class. It destroys the windows created by the displayer.
Public Static Functions Documentation
function DownsampleImageIfNecessary
Down-samples image in case it is bigger than maximum dimensions.
The maximum dimensions are defined by: constants::MAX_WIDTH_DISPLAY_WINDOW and constants::MAX_HEIGHT_DISPLAY_WINDOW
Parameters:
imageimage to be downsampled
Protected Attributes Documentation
variable m_mainWindow
reference to the main window, necessary to read UI element values.
The documentation for this class was generated from the following file src/displayFunctional.h