Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkImageStatisticsWidget Class Reference

Widget for displaying image statistics in a tree view with clipboard export. More...

#include <QmitkImageStatisticsWidget.h>

Inheritance diagram for QmitkImageStatisticsWidget:
Collaboration diagram for QmitkImageStatisticsWidget:

Signals

void IgnoreZeroValuedVoxelStateChanged (Qt::CheckState status)
 Emitted when the user toggles the "ignore zero-valued voxels" checkbox. More...
 

Public Member Functions

 QmitkImageStatisticsWidget (QWidget *parent=nullptr)
 Constructs the image statistics widget. More...
 
 ~QmitkImageStatisticsWidget () override
 Destructor. More...
 
void SetDataStorage (mitk::DataStorage *newDataStorage)
 Sets the data storage from which the model fetches statistics objects. More...
 
void SetImageNodes (const std::vector< mitk::DataNode::ConstPointer > &nodes)
 Sets the image nodes whose statistics should be displayed. More...
 
void SetMaskNodes (const std::vector< mitk::DataNode::ConstPointer > &nodes)
 Sets the mask nodes whose statistics should be displayed. More...
 
void Reset ()
 Clears all data from the model and disables the widget controls. More...
 
void SetIgnoreZeroValueVoxel (bool _arg)
 Sets whether zero-valued voxels should be ignored when selecting statistics. More...
 
bool GetIgnoreZeroValueVoxel () const
 Returns whether zero-valued voxels are currently being ignored. More...
 
void SetHistogramNBins (unsigned int nbins)
 Sets the number of histogram bins used to select matching statistics. More...
 
unsigned int GetHistogramNBins () const
 Returns the current number of histogram bins. More...
 

Detailed Description

Widget for displaying image statistics in a tree view with clipboard export.

This widget wraps a QmitkImageStatisticsTreeModel in a sortable tree view and provides controls for ignoring zero-valued voxels and copying statistics to the clipboard. It automatically enables its controls when statistics data becomes available.

See also
QmitkImageStatisticsTreeModel
QmitkHistogramVisualizationWidget
QmitkStatisticsModelToStringConverter

Definition at line 42 of file QmitkImageStatisticsWidget.h.

Constructor & Destructor Documentation

◆ QmitkImageStatisticsWidget()

QmitkImageStatisticsWidget::QmitkImageStatisticsWidget ( QWidget *  parent = nullptr)

Constructs the image statistics widget.

Parameters
[in]parentOptional parent widget.

◆ ~QmitkImageStatisticsWidget()

QmitkImageStatisticsWidget::~QmitkImageStatisticsWidget ( )
override

Destructor.

Member Function Documentation

◆ GetHistogramNBins()

unsigned int QmitkImageStatisticsWidget::GetHistogramNBins ( ) const

Returns the current number of histogram bins.

Returns
The number of histogram bins.

◆ GetIgnoreZeroValueVoxel()

bool QmitkImageStatisticsWidget::GetIgnoreZeroValueVoxel ( ) const

Returns whether zero-valued voxels are currently being ignored.

Returns
True if zero-valued voxels are ignored; false otherwise.

◆ IgnoreZeroValuedVoxelStateChanged

void QmitkImageStatisticsWidget::IgnoreZeroValuedVoxelStateChanged ( Qt::CheckState  status)
signal

Emitted when the user toggles the "ignore zero-valued voxels" checkbox.

Parameters
[in]statusThe new checkbox state.

◆ Reset()

void QmitkImageStatisticsWidget::Reset ( )

Clears all data from the model and disables the widget controls.

◆ SetDataStorage()

void QmitkImageStatisticsWidget::SetDataStorage ( mitk::DataStorage *  newDataStorage)

Sets the data storage from which the model fetches statistics objects.

Parameters
[in]newDataStoragePointer to the data storage. Must be valid.
Precondition
The data storage must not be nullptr.

◆ SetHistogramNBins()

void QmitkImageStatisticsWidget::SetHistogramNBins ( unsigned int  nbins)

Sets the number of histogram bins used to select matching statistics.

Parameters
[in]nbinsThe number of histogram bins.

◆ SetIgnoreZeroValueVoxel()

void QmitkImageStatisticsWidget::SetIgnoreZeroValueVoxel ( bool  _arg)

Sets whether zero-valued voxels should be ignored when selecting statistics.

Parameters
[in]_argTrue to ignore zero-valued voxels; false to include them.

◆ SetImageNodes()

void QmitkImageStatisticsWidget::SetImageNodes ( const std::vector< mitk::DataNode::ConstPointer > &  nodes)

Sets the image nodes whose statistics should be displayed.

Parameters
[in]nodesVector of image data nodes.

◆ SetMaskNodes()

void QmitkImageStatisticsWidget::SetMaskNodes ( const std::vector< mitk::DataNode::ConstPointer > &  nodes)

Sets the mask nodes whose statistics should be displayed.

Parameters
[in]nodesVector of mask data nodes.

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