17 #include <qcustomplot.h>
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();
QCustomPlot: small arrows at the bottom.
QCustomPlot: vertical bar with text along side.
QCustomPlot: colored histogram.
QCustomPlot: greyed areas.
QSharedPointer< ccColorScale > Shared
Shared pointer type.
Encapsulating dialog for ccHistogramWindow.
virtual ~ccHistogramWindowDlg()
Destructor.
void onExportToImage()
When the export to Image file button is pressed.
ccHistogramWindow * window()
Returns encapsulated ccHistogramWindow.
ccHistogramWindowDlg(QWidget *parent=0)
Default constructor.
ccHistogramWindow * m_win
void onExportToCSV()
When the export to CSV file button is pressed.
bool exportToCSV(QString filename) const
Exports histogram to a CSV file.
Ui_HistogramDialog * m_gui
Associated widgets.
HISTOGRAM_COLOR_SCHEME m_colorScheme
Color scheme.
void refreshBars()
Updates the histogram bars only.
void setMinDispValue(double)
void setTitle(const QString &str)
Sets title.
void setCurveValues(const std::vector< double > &curveValues)
Sets overlay curve values.
void sfMaxSatValChanged(double)
double m_areaLeftlastValue
const std::vector< unsigned > & histoValues() const
Returns the current histogram bins.
virtual ~ccHistogramWindow()
Destructor.
void setColorScale(ccColorScale::Shared scale)
Sets gradient color scale.
double minVal() const
Returns the current histogram min value.
void resizeEvent(QResizeEvent *event)
bool m_refreshAfterResize
QCPHiddenArea * m_areaRight
Right greyed area.
unsigned getMaxHistoVal()
Returns current maximum bin size.
void sfMinSatValChanged(double)
void wheelEvent(QWheelEvent *event)
QPoint m_lastMouseClick
Last mouse click.
QCPBarsWithText * m_vertBar
void setMinSatValue(double)
ccHistogramWindow(QWidget *parent=0)
Default constructor.
void refresh()
Updates the display.
double m_areaRightlastValue
void setColorScheme(HISTOGRAM_COLOR_SCHEME scheme)
Sets how the gradient bars should be colored.
void fromSF(ccScalarField *sf, unsigned initialNumberOfClasses=0, bool numberOfClassesCanBeChanged=true, bool showNaNValuesInGrey=true)
Computes histogram from a scalar field.
ccScalarField * m_associatedSF
Associated scalar field.
ccColorScale::Shared m_colorScale
Gradient color scale.
void sfMinDispValChanged(double)
AxisDisplayOptions m_axisDisplayOptions
void fromBinArray(const std::vector< unsigned > &histoValues, double minVal, double maxVal)
void setAxisDisplayOption(AxisDisplayOptions axisOptions)
void setRefreshAfterResize(bool refreshAfterResize)
void setSolidColor(QColor color)
Sets solid color.
SELECTABLE_ITEMS m_selectedItem
Currently selected item.
QCPHiddenArea * m_areaLeft
Left greyed area.
void setNumberOfClasses(size_t n)
Changes the current number of classes.
SELECTABLE_ITEMS
Selectable items in "SF interaction" mode.
double m_verticalIndicatorPositionPercent
QCPGraph * m_overlayCurve
Overlay curve.
double m_arrowLeftlastValue
void mouseMoveEvent(QMouseEvent *event)
void setSFInteractionMode(SFInteractionModes modes)
Enables SF interaction mode.
QCPArrow * m_arrowRight
Right arrow.
void sfMaxDispValChanged(double)
bool computeBinArrayFromSF(size_t binCount)
Dynamically computes histogram bins from scalar field.
QCPColoredBars * m_histogram
std::vector< double > m_curveValues
void mousePressEvent(QMouseEvent *event)
double maxVal() const
Returns the current histogram max value.
QFont m_renderingFont
Rendering font.
QColor m_solidColor
Solid color.
void setMaxSatValue(double)
void setMaxDispValue(double)
bool m_numberOfClassesCanBeChanged
SFInteractionModes m_sfInteractionModes
Which SF interaction modes are enabled.
void clear()
Clears the display.
QCPArrow * m_arrowLeft
Left arrow.
bool m_drawVerticalIndicator
std::vector< unsigned > m_histoValues
void setAxisLabels(const QString &xLabel, const QString &yLabel)
Sets axis labels.
QCPTextElement * m_titlePlot
void updateOverlayCurveWidth(int w, int h)
Updates overlay curve width depending on the widget display size.
double m_arrowRightlastValue
A scalar field associated to display-related parameters.