 |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Go to the documentation of this file.
25 class Ui_HistogramDialog;
41 void setAxisLabels(
const QString& xLabel,
const QString& yLabel);
52 unsigned initialNumberOfClasses = 0,
53 bool numberOfClassesCanBeChanged =
true,
54 bool showNaNValuesInGrey =
true);
123 SaturationRange = 0x02,
124 All = DisplayRange | SaturationRange
163 void clearInternal();
QCPAxis * xAxis
Definition: qcustomplot.h:2219
@ aeAll
0xFFFF All elements
Definition: qcustomplot.h:194
static QString GetSaveFilename(const QString &dialogTitle, const QString &baseName, const QString &imageSavePath, QWidget *parentWidget=nullptr)
Helper: select an output image filename.
Definition: ImageFileFilter.cpp:74
QCustomPlot: small arrows at the bottom.
Definition: ecvQCustomPlot.h:332
@ NONE
Definition: ecvHistogramWindow.h:219
double colors[3]
Definition: TriangleMeshIO.cpp:53
QCPColoredBars * m_histogram
Definition: ecvHistogramWindow.h:193
bool addElement(int row, int column, QCPLayoutElement *element)
Definition: qcustomplot.cpp:2562
HISTOGRAM_COLOR_SCHEME m_colorScheme
Color scheme.
Definition: ecvHistogramWindow.h:177
QTextStream & endl(QTextStream &stream)
Definition: QtCompat.h:718
void setAutoAddPlottableToLegend(bool on)
Definition: qcustomplot.cpp:9507
double currentVal() const
Definition: ecvQCustomPlot.h:195
std::string filename
Definition: PointCloudIO.cpp:47
void setPen(const QPen &pen)
Definition: qcustomplot.cpp:7136
QColor m_solidColor
Solid color.
Definition: ecvHistogramWindow.h:179
static const QChar s_csvSep(';')
unsigned getColorRampSteps() const
Returns number of color ramp steps.
Definition: ecvScalarField.h:194
void setColor(int r, int g, int b)
Sets triangle 'inside' color.
Definition: ecvQCustomPlot.h:349
int clearGraphs()
Definition: qcustomplot.cpp:10066
void setData(QCPBarDataMap *data, bool copy=false)
Definition: qcustomplot.cpp:19594
ScalarType stop() const
Definition: ecvScalarField.h:44
normal_z x
Definition: my_point_types.h:165
constexpr Rgb darkGrey(MAX/2, MAX/2, MAX/2)
void fromSF(ccScalarField *sf, unsigned initialNumberOfClasses=0, bool numberOfClassesCanBeChanged=true, bool showNaNValuesInGrey=true)
Computes histogram from a scalar field.
Definition: ecvHistogramWindow.cpp:127
double pixelToKey(int pixX) const
Converts a pixel value (X) to the equivalent key.
Definition: ecvQCustomPlot.h:213
double m_verticalIndicatorPositionPercent
Definition: ecvHistogramWindow.h:206
ScalarType & getValue(std::size_t index)
Definition: ScalarField.h:92
static const QString SaveFile()
Definition: ecvPersistentSettings.h:21
QSharedPointer< ccColorScale > Shared
Shared pointer type.
Definition: ecvColorScale.h:74
void appendText(QString text)
Definition: ecvQCustomPlot.h:29
const ecvColor::Rgb * getColor(ScalarType value) const
Definition: ecvScalarField.h:139
#define signals
Definition: PythonPlugin.cpp:26
ScalarType start() const
Definition: ecvScalarField.h:43
QCPHiddenArea * m_areaRight
Right greyed area.
Definition: ecvHistogramWindow.h:234
static ccColorScale::Shared GetDefaultScale(DEFAULT_SCALES scale=BGYR)
Returns a pre-defined color scale (static shortcut)
Definition: ecvColorScalesManager.h:61
void sfMaxDispValChanged(double)
constexpr Rgb lightGrey(static_cast< ColorCompType >(MAX *0.8), static_cast< ColorCompType >(MAX *0.8), static_cast< ColorCompType >(MAX *0.8))
static bool Print(const char *format,...)
Prints out a formatted message in console.
Definition: CVLog.cpp:113
void mouseMoveEvent(QMouseEvent *event)
Definition: ecvHistogramWindow.cpp:710
void onExportToCSV()
When the export to CSV file button is pressed.
Definition: ecvHistogramWindow.cpp:915
void setColorScale(ccColorScale::Shared scale)
Sets gradient color scale.
Definition: ecvHistogramWindow.h:90
QString m_titleStr
Definition: ecvHistogramWindow.h:173
void setData(const QVector< double > &key, const QVector< double > &value)
Definition: ecvQCustomPlot.h:88
double m_minVal
Definition: ecvHistogramWindow.h:195
Histogram widget.
Definition: ecvHistogramWindow.h:28
QCPTextElement * m_titlePlot
Definition: ecvHistogramWindow.h:174
void setSaturationStop(ScalarType val)
Sets the value at which to stop color gradient.
Definition: ecvScalarField.cpp:275
void setSaturationStart(ScalarType val)
Sets the value at which to start color gradient.
Definition: ecvScalarField.cpp:266
bool remove(QCPLayoutElement *element)
Definition: qcustomplot.cpp:2193
virtual ~ccHistogramWindow()
Destructor.
Definition: ecvHistogramWindow.cpp:85
Type r
Definition: ecvColorTypes.h:54
Q_SLOT void replot(QCustomPlot::RefreshPriority refreshPriority=QCustomPlot::rpHint)
Definition: qcustomplot.cpp:10636
void setAntialiased(bool enabled)
Definition: qcustomplot.cpp:981
math::float4 color
Definition: LineSetBuffers.cpp:46
int clearPlottables()
Definition: qcustomplot.cpp:9877
std::vector< unsigned > m_histoValues
Definition: ecvHistogramWindow.h:194
double maxVal() const
Returns the current histogram max value.
Definition: ecvHistogramWindow.h:108
double qtCompatWheelEventDelta(const QWheelEvent *event) noexcept
Definition: QtCompat.h:751
SFInteractionMode
Definition: ecvHistogramWindow.h:120
void setSolidColor(QColor color)
Sets solid color.
Definition: ecvHistogramWindow.h:87
virtual void clearData()
Definition: ecvQCustomPlot.h:117
A plottable representing a graph in a plot.
Definition: qcustomplot.h:2973
Color scales manager/container.
Definition: ecvColorScalesManager.h:17
void setText(QString text)
Definition: ecvQCustomPlot.h:28
void setLabel(const QString &str)
Definition: qcustomplot.cpp:4897
int width
Definition: FileIOFactory.cpp:142
QString defaultDocPath()
Shortcut for getting the documents location path.
Definition: ecvFileUtils.h:30
static bool Error(const char *format,...)
Display an error dialog with formatted message.
Definition: CVLog.cpp:143
void setColorScheme(HISTOGRAM_COLOR_SCHEME scheme)
Sets how the gradient bars should be colored.
Definition: ecvHistogramWindow.h:81
void setTitle(const QString &str)
Sets title.
Definition: ecvHistogramWindow.cpp:106
void setWidth(double width)
Definition: qcustomplot.cpp:19544
SELECTABLE_ITEMS m_selectedItem
Currently selected item.
Definition: ecvHistogramWindow.h:228
ccHistogramWindowDlg(QWidget *parent=0)
Default constructor.
Definition: ecvHistogramWindow.cpp:842
int height
Definition: FileIOFactory.cpp:143
void refreshBars()
Updates the histogram bars only.
Definition: ecvHistogramWindow.cpp:276
void refresh()
Updates the display.
Definition: ecvHistogramWindow.cpp:323
ScalarType getMin() const
Returns the minimum value.
Definition: ScalarField.h:72
void setAntialiasedFill(bool enabled)
Definition: qcustomplot.cpp:7101
normal_z y
Definition: my_point_types.h:168
QCPArrow * m_arrowLeft
Left arrow.
Definition: ecvHistogramWindow.h:238
MouseEvent event
Definition: BitmapWindowSystem.cpp:61
void wheelEvent(QWheelEvent *event)
Definition: ecvHistogramWindow.cpp:822
QCPArrow * m_arrowRight
Right arrow.
Definition: ecvHistogramWindow.h:241
QCPAxis * yAxis
Definition: qcustomplot.h:2219
constexpr utility::nullopt_t None
Definition: TensorKey.h:20
ccHistogramWindow(QWidget *parent=0)
Default constructor.
Definition: ecvHistogramWindow.cpp:35
void setData(QCPDataMap *data, bool copy=false)
Definition: qcustomplot.cpp:14909
Encapsulating dialog for ccHistogramWindow.
Definition: ecvHistogramWindow.h:249
virtual bool isSelectable(QPoint click) const
Definition: ecvQCustomPlot.h:188
@ LEFT_AREA
Definition: ecvHistogramWindow.h:220
const double * e
Definition: essential_matrix_poly.h:10
QPoint m_lastMouseClick
Last mouse click.
Definition: ecvHistogramWindow.h:245
QCustomPlot: vertical bar with text along side.
Definition: ecvQCustomPlot.h:21
Type g
Definition: ecvColorTypes.h:54
@ USE_SOLID_COLOR
Definition: ecvHistogramWindow.h:76
void setCurveValues(const std::vector< double > &curveValues)
Sets overlay curve values.
Definition: ecvHistogramWindow.cpp:170
void setTextAlignment(bool left)
Definition: ecvQCustomPlot.h:30
virtual void link()
Increase counter.
Definition: CVShareable.cpp:33
HISTOGRAM_COLOR_SCHEME
Definition: ecvHistogramWindow.h:75
bool exportToCSV(QString filename) const
Exports histogram to a CSV file.
Definition: ecvHistogramWindow.cpp:866
virtual void release()
Decrease counter and deletes object when 0.
Definition: CVShareable.cpp:35
ScalarType getMax() const
Returns the maximum value.
Definition: ScalarField.h:74
bool computeBinArrayFromSF(size_t binCount)
Dynamically computes histogram bins from scalar field.
Definition: ecvHistogramWindow.cpp:179
const std::vector< unsigned > & histoValues() const
Returns the current histogram bins.
Definition: ecvHistogramWindow.h:102
void setCurrentVal(double val)
Definition: ecvQCustomPlot.h:204
void setName(const QString &name)
Definition: qcustomplot.cpp:7092
void setSubTickLength(int inside, int outside=0)
Definition: qcustomplot.cpp:4819
ccHistogramWindow * window()
Returns encapsulated ccHistogramWindow.
Definition: ecvHistogramWindow.h:259
virtual ~ccHistogramWindowDlg()
Destructor.
Definition: ecvHistogramWindow.cpp:861
void setMinSatValue(double)
Definition: ecvHistogramWindow.cpp:622
ccHistogramWindow * m_win
Definition: ecvHistogramWindow.h:273
MiniVec< float, N > floor(const MiniVec< float, N > &a)
Definition: MiniVec.h:75
double m_arrowLeftlastValue
Definition: ecvHistogramWindow.h:239
QCPGraph * m_overlayCurve
Overlay curve.
Definition: ecvHistogramWindow.h:200
std::shared_ptr< core::Tensor > image
Definition: FilamentRenderer.cpp:184
void setRefreshAfterResize(bool refreshAfterResize)
Definition: ecvHistogramWindow.cpp:319
QCustomPlot: colored histogram.
Definition: ecvQCustomPlot.h:73
void setRange(double minVal, double maxVal)
Definition: ecvQCustomPlot.h:207
void setTickLength(int inside, int outside=0)
Definition: qcustomplot.cpp:4764
AxisDisplayOptions m_axisDisplayOptions
Definition: ecvHistogramWindow.h:211
unsigned displayedNumPrecision
Displayed numbers precision.
Definition: ecvGuiParameters.h:100
void onExportToImage()
When the export to Image file button is pressed.
Definition: ecvHistogramWindow.cpp:946
QCPGraph * addGraph(QCPAxis *keyAxis=0, QCPAxis *valueAxis=0)
Definition: qcustomplot.cpp:10007
void sfMaxSatValChanged(double)
Type b
Definition: ecvColorTypes.h:54
double m_areaRightlastValue
Definition: ecvHistogramWindow.h:235
@ RIGHT_ARROW
Definition: ecvHistogramWindow.h:224
double m_areaLeftlastValue
Definition: ecvHistogramWindow.h:232
AxisDisplayOption
Definition: ecvHistogramWindow.h:111
ScalarType min() const
Definition: ecvScalarField.h:42
static const ParamStruct & Parameters()
Returns the stored values of each parameter.
Definition: ecvGuiParameters.cpp:24
void setNumberOfClasses(size_t n)
Changes the current number of classes.
Definition: ecvHistogramWindow.cpp:255
void fromBinArray(const std::vector< unsigned > &histoValues, double minVal, double maxVal)
Definition: ecvHistogramWindow.cpp:153
const Range & saturationRange() const
Access to the range of saturation values.
Definition: ecvScalarField.h:114
The central class of the library. This is the QWidget which displays the plot and interacts with the ...
Definition: qcustomplot.h:2020
virtual void resizeEvent(QResizeEvent *event)
Definition: qcustomplot.cpp:11028
void setMaxDisplayed(ScalarType val)
Sets the maximum displayed value.
Definition: ecvScalarField.cpp:261
const Histogram & getHistogram() const
Returns associated histogram values (for display)
Definition: ecvScalarField.h:206
void setAxisLabels(const QString &xLabel, const QString &yLabel)
Sets axis labels.
Definition: ecvHistogramWindow.cpp:108
bool m_refreshAfterResize
Definition: ecvHistogramWindow.h:190
int count
Definition: FileIOFactory.cpp:132
void sfMinDispValChanged(double)
QCPLayoutGrid * plotLayout() const
Definition: qcustomplot.h:2081
static bool Warning(const char *format,...)
Prints out a formatted warning message in console.
Definition: CVLog.cpp:133
void setMaxSatValue(double)
Definition: ecvHistogramWindow.cpp:639
ccScalarField * m_associatedSF
Associated scalar field.
Definition: ecvHistogramWindow.h:184
RGB color structure.
Definition: ecvColorTypes.h:49
const ccColorScale::Shared & getColorScale() const
Returns associated color scale.
Definition: ecvScalarField.h:186
SFInteractionModes m_sfInteractionModes
Which SF interaction modes are enabled.
Definition: ecvHistogramWindow.h:215
bool m_drawVerticalIndicator
Definition: ecvHistogramWindow.h:205
bool symmetricalScale() const
Returns whether the color scale s symmetrical or not.
Definition: ecvScalarField.h:174
double m_arrowRightlastValue
Definition: ecvHistogramWindow.h:242
void sfMinSatValChanged(double)
@ USE_SF_SCALE
Definition: ecvHistogramWindow.h:78
static const QString CurrentPath()
Definition: ecvPersistentSettings.h:39
ScalarType max() const
Definition: ecvScalarField.h:45
void setMinDisplayed(ScalarType val)
Sets the minimum displayed value.
Definition: ecvScalarField.cpp:256
void setMaxDispValue(double)
Definition: ecvHistogramWindow.cpp:605
ccColorScale::Shared m_colorScale
Gradient color scale.
Definition: ecvHistogramWindow.h:181
void setVisible(bool on)
Definition: qcustomplot.cpp:944
@ LEFT_ARROW
Definition: ecvHistogramWindow.h:223
constexpr Rgb red(MAX, 0, 0)
QCPBarsWithText * m_vertBar
Definition: ecvHistogramWindow.h:204
@ BOTH_ARROWS
Definition: ecvHistogramWindow.h:225
Scalar field range structure.
Definition: ecvScalarField.h:36
QFont m_renderingFont
Rendering font.
Definition: ecvHistogramWindow.h:209
double minVal() const
Returns the current histogram min value.
Definition: ecvHistogramWindow.h:106
void updateOverlayCurveWidth(int w, int h)
Updates overlay curve width depending on the widget display size.
Definition: ecvHistogramWindow.cpp:656
constexpr Rgb blue(0, 0, MAX)
QRect rect() const
Definition: ecvQCustomPlot.h:114
QCustomPlot: greyed areas.
Definition: ecvQCustomPlot.h:255
@ USE_CUSTOM_COLOR_SCALE
Definition: ecvHistogramWindow.h:77
void clear()
Clears the display.
Definition: ecvHistogramWindow.cpp:87
SELECTABLE_ITEMS
Selectable items in "SF interaction" mode.
Definition: ecvHistogramWindow.h:218
void setAxisDisplayOption(AxisDisplayOptions axisOptions)
Definition: ecvHistogramWindow.cpp:315
unsigned m_maxHistoVal
Definition: ecvHistogramWindow.h:197
@ BOTH_AREAS
Definition: ecvHistogramWindow.h:222
void setAntialiasedElements(const QCP::AntialiasedElements &antialiasedElements)
Definition: qcustomplot.cpp:9419
double m_maxVal
Definition: ecvHistogramWindow.h:196
void setSFInteractionMode(SFInteractionModes modes)
Enables SF interaction mode.
Definition: ecvHistogramWindow.cpp:311
void setBrush(const QBrush &brush)
Definition: qcustomplot.cpp:7157
unsigned getMaxHistoVal()
Returns current maximum bin size.
Definition: ecvHistogramWindow.cpp:245
void insertRow(int newIndex)
Definition: qcustomplot.cpp:2752
bool m_numberOfClassesCanBeChanged
Definition: ecvHistogramWindow.h:188
unsigned currentSize() const
Definition: ScalarField.h:100
std::vector< double > m_curveValues
Definition: ecvHistogramWindow.h:201
const Range & displayRange() const
Access to the range of displayed values.
Definition: ecvScalarField.h:108
void setMinDispValue(double)
Definition: ecvHistogramWindow.cpp:588
A scalar field associated to display-related parameters.
Definition: ecvScalarField.h:19
void resizeEvent(QResizeEvent *event)
Definition: ecvHistogramWindow.cpp:667
QPen pen() const
Definition: qcustomplot.h:1704
void mousePressEvent(QMouseEvent *event)
Definition: ecvHistogramWindow.cpp:676
Q_SLOT void setRange(const QCPRange &range)
Definition: qcustomplot.cpp:4166
QCPHiddenArea * m_areaLeft
Left greyed area.
Definition: ecvHistogramWindow.h:231
Ui_HistogramDialog * m_gui
Associated widgets.
Definition: ecvHistogramWindow.h:276
@ RIGHT_AREA
Definition: ecvHistogramWindow.h:221