Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkHistogramVisualizationWidget Class Reference

Widget for displaying and interacting with histogram visualizations. More...

#include <QmitkHistogramVisualizationWidget.h>

Inheritance diagram for QmitkHistogramVisualizationWidget:
Collaboration diagram for QmitkHistogramVisualizationWidget:

Signals

void RequestHistogramUpdate (unsigned int nBins)
 Emitted when the user changes the number of bins. More...
 

Public Member Functions

 QmitkHistogramVisualizationWidget (QWidget *parent=nullptr)
 Constructs the histogram visualization widget. More...
 
 ~QmitkHistogramVisualizationWidget () override
 Destructor. More...
 
void SetHistogram (itk::Statistics::Histogram< double >::ConstPointer histogram, const std::string &dataLabel)
 Displays a histogram in the chart and enables the GUI controls. More...
 
void Reset ()
 Clears all histogram data and disables all GUI elements. More...
 
void SetTheme (QmitkChartWidget::ColorTheme style)
 Sets the color theme for the chart widget. More...
 
void ResetDefault ()
 Resets all controls to their default settings. More...
 
int GetBins ()
 Returns the current number of histogram bins configured in the spin box. More...
 

Detailed Description

Widget for displaying and interacting with histogram visualizations.

Provides a chart-based histogram display with controls for adjusting the number of bins, toggling a subchart view, setting custom min/max value ranges, and copying histogram data to the clipboard. Multiple histograms can be displayed simultaneously, each identified by a data label.

See also
QmitkChartWidget
QmitkImageStatisticsWidget

Definition at line 40 of file QmitkHistogramVisualizationWidget.h.

Constructor & Destructor Documentation

◆ QmitkHistogramVisualizationWidget()

QmitkHistogramVisualizationWidget::QmitkHistogramVisualizationWidget ( QWidget *  parent = nullptr)

Constructs the histogram visualization widget.

Parameters
[in]parentOptional parent widget.

◆ ~QmitkHistogramVisualizationWidget()

QmitkHistogramVisualizationWidget::~QmitkHistogramVisualizationWidget ( )
override

Destructor.

Member Function Documentation

◆ GetBins()

int QmitkHistogramVisualizationWidget::GetBins ( )

Returns the current number of histogram bins configured in the spin box.

Returns
The number of bins.

◆ RequestHistogramUpdate

void QmitkHistogramVisualizationWidget::RequestHistogramUpdate ( unsigned int  nBins)
signal

Emitted when the user changes the number of bins.

Listeners (e.g., a statistics calculator) should connect to this signal and recalculate histogram data with the updated bin count.

Parameters
[in]nBinsThe new number of bins requested by the user.

◆ Reset()

void QmitkHistogramVisualizationWidget::Reset ( )

Clears all histogram data and disables all GUI elements.

◆ ResetDefault()

void QmitkHistogramVisualizationWidget::ResetDefault ( )

Resets all controls to their default settings.

Enables the default number of bins checkbox, sets bins to 100, and disables the subchart.

◆ SetHistogram()

void QmitkHistogramVisualizationWidget::SetHistogram ( itk::Statistics::Histogram< double >::ConstPointer  histogram,
const std::string &  dataLabel 
)

Displays a histogram in the chart and enables the GUI controls.

If a histogram with the given label already exists, it is updated. Otherwise, a new histogram series is added to the chart.

Parameters
[in]histogramThe ITK histogram to display. If nullptr, the call is ignored.
[in]dataLabelA unique label identifying this histogram series.

◆ SetTheme()

void QmitkHistogramVisualizationWidget::SetTheme ( QmitkChartWidget::ColorTheme  style)

Sets the color theme for the chart widget.

Parameters
[in]styleThe color theme to apply (dark or light).

The documentation for this class was generated from the following file: