ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvColorLevelsDlg.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 // Qt
11 #include <ui_colorLevelsDlg.h>
12 
13 #include <QColor>
14 
15 class ccHistogramWindow;
17 
19 class ccColorLevelsDlg : public QDialog, public Ui::ColorLevelsDialog {
20  Q_OBJECT
21 
22 public:
24  ccColorLevelsDlg(QWidget* parent, ccGenericPointCloud* pointCloud);
25 
26 protected slots:
27 
28  void onChannelChanged(int);
29  void onApply();
30 
31 protected:
33  enum CHANNELS { RGB = 0, RED = 1, GREEN = 2, BLUE = 3 };
34 
36  void updateHistogram();
37 
40 
43 };
s_inputLevels
static int s_inputLevels[2]
Definition: ecvColorLevelsDlg.cpp:27
rgb
normal_z rgb
Definition: my_point_types.h:168
ccColorLevelsDlg::RGB
@ RGB
Definition: ecvColorLevelsDlg.h:33
ecvColor::black
constexpr Rgb black(0, 0, 0)
s_outputLevelsEnabled
static bool s_outputLevelsEnabled
Definition: ecvColorLevelsDlg.cpp:29
cloudViewer::GenericCloud::size
virtual unsigned size() const =0
Returns the number of points.
ccColorLevelsDlg::GREEN
@ GREEN
Definition: ecvColorLevelsDlg.h:33
ecvHistogramWindow.h
ccHObjectCaster::ToPointCloud
static ccPointCloud * ToPointCloud(ccHObject *obj, bool *isLockedVertices=nullptr)
Converts current object to 'equivalent' ccPointCloud.
Definition: ecvHObjectCaster.cpp:54
string.h
ccColorLevelsDlg::onChannelChanged
void onChannelChanged(int)
Definition: ecvColorLevelsDlg.cpp:140
ecvDisplayTools.h
ccColorLevelsDlg::BLUE
@ BLUE
Definition: ecvColorLevelsDlg.h:33
ccHistogramWindow
Histogram widget.
Definition: ecvHistogramWindow.h:28
ccPointCloud
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
Definition: ecvPointCloud.h:146
ccColorLevelsDlg::CHANNELS
CHANNELS
Channels.
Definition: ecvColorLevelsDlg.h:33
ccHistogramWindow::setSolidColor
void setSolidColor(QColor color)
Sets solid color.
Definition: ecvHistogramWindow.h:87
ccColorLevelsDlg::RED
@ RED
Definition: ecvColorLevelsDlg.h:33
ecvColor::RgbTpl::rgb
Type rgb[3]
Definition: ecvColorTypes.h:56
ccColorLevelsDlg
Dialog to change the color levels.
Definition: ecvColorLevelsDlg.h:19
ccHistogramWindow::setColorScheme
void setColorScheme(HISTOGRAM_COLOR_SCHEME scheme)
Sets how the gradient bars should be colored.
Definition: ecvHistogramWindow.h:81
slots
#define slots
Definition: PythonPlugin.cpp:25
ccHistogramWindow::refresh
void refresh()
Updates the display.
Definition: ecvHistogramWindow.cpp:323
ccGenericPointCloud
A 3D cloud interface with associated features (color, normals, octree, etc.)
Definition: ecvGenericPointCloud.h:45
ecvColor::MAX
constexpr ColorCompType MAX
Max value of a single color component (default type)
Definition: ecvColorTypes.h:34
ecvGenericPointCloud.h
Ui
Definition: sfEditDlg.h:16
ecvColor::green
constexpr Rgb green(0, MAX, 0)
ccHistogramWindow::USE_SOLID_COLOR
@ USE_SOLID_COLOR
Definition: ecvHistogramWindow.h:76
ecvColorLevelsDlg.h
ccGenericPointCloud::getPointColor
virtual const ecvColor::Rgb & getPointColor(unsigned pointIndex) const =0
Returns color corresponding to a given point.
s_outputLevels
static int s_outputLevels[2]
Definition: ecvColorLevelsDlg.cpp:28
ecvHObjectCaster.h
ccHistogramWindow::fromBinArray
void fromBinArray(const std::vector< unsigned > &histoValues, double minVal, double maxVal)
Definition: ecvHistogramWindow.cpp:153
ccHistogramWindow::setAxisLabels
void setAxisLabels(const QString &xLabel, const QString &yLabel)
Sets axis labels.
Definition: ecvHistogramWindow.cpp:108
ecvColor::RgbTpl
RGB color structure.
Definition: ecvColorTypes.h:49
ccColorLevelsDlg::m_cloud
ccGenericPointCloud * m_cloud
Associated point cloud (color source)
Definition: ecvColorLevelsDlg.h:42
ecvDisplayTools::RedrawDisplay
static void RedrawDisplay(bool only2D=false, bool forceRedraw=true)
Definition: ecvDisplayTools.cpp:2883
ccColorLevelsDlg::onApply
void onApply()
Definition: ecvColorLevelsDlg.cpp:142
ccColorLevelsDlg::ccColorLevelsDlg
ccColorLevelsDlg(QWidget *parent, ccGenericPointCloud *pointCloud)
Default constructor.
Definition: ecvColorLevelsDlg.cpp:31
ecvColor::red
constexpr Rgb red(MAX, 0, 0)
ecvColor::blue
constexpr Rgb blue(0, 0, MAX)
ccColorLevelsDlg::updateHistogram
void updateHistogram()
Updates histogram.
Definition: ecvColorLevelsDlg.cpp:67
ColorCompType
unsigned char ColorCompType
Default color components type (R,G and B)
Definition: ecvColorTypes.h:29
ccHistogramWindow::clear
void clear()
Clears the display.
Definition: ecvHistogramWindow.cpp:87
ccPointCloud::setPointColor
void setPointColor(size_t pointIndex, const ecvColor::Rgb &col)
Sets a particular point color.
Definition: ecvPointCloud.cpp:1649
ecvPointCloud.h
ccColorLevelsDlg::m_histogram
ccHistogramWindow * m_histogram
Associated histogram view.
Definition: ecvColorLevelsDlg.h:39