Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkImageStatisticsTreeItem Class Reference

An item that represents an entry (usually an ImageStatisticsObject) for the QmitkImageStatisticsTreeModel. More...

#include <QmitkImageStatisticsTreeItem.h>

Public Types

using ImageStatisticsObject = mitk::ImageStatisticsContainer::ImageStatisticsObject
 
using StatisticNameVector = mitk::ImageStatisticsContainer::ImageStatisticsObject::StatisticNameVector
 

Public Member Functions

 QmitkImageStatisticsTreeItem ()
 Default constructor. Creates an empty item with no statistics data. More...
 
 QmitkImageStatisticsTreeItem (const ImageStatisticsObject &statisticsData, const StatisticNameVector &statisticNames, QVariant itemText, bool isWIP, QmitkImageStatisticsTreeItem *parentItem=nullptr, const mitk::DataNode *imageNode=nullptr, const mitk::DataNode *maskNode=nullptr, const mitk::Label *label=nullptr)
 Construct a tree item holding actual statistics data. More...
 
 QmitkImageStatisticsTreeItem (const StatisticNameVector &statisticNames, QVariant itemText, bool isWIP, bool isNA, QmitkImageStatisticsTreeItem *parentItem=nullptr, const mitk::DataNode *imageNode=nullptr, const mitk::DataNode *maskNode=nullptr, const mitk::Label *label=nullptr)
 Construct a tree item without statistics data (e.g. a group header). More...
 
 ~QmitkImageStatisticsTreeItem ()
 
void appendChild (QmitkImageStatisticsTreeItem *child)
 Append a child item to this item. More...
 
QmitkImageStatisticsTreeItem * child (int row)
 Return the child item at the given row. More...
 
int childCount () const
 Return the number of child items. More...
 
int columnCount () const
 Return the number of data columns. More...
 
QVariant data (int column) const
 Return the data for the given column. More...
 
int row () const
 Return this item's row index within its parent. More...
 
QmitkImageStatisticsTreeItem * parentItem ()
 Return the parent item, or nullptr if this is the root. More...
 
bool isWIP () const
 Indicate whether the statistics are still being computed (work in progress). More...
 
mitk::Label::ConstPointer GetLabelInstance () const
 Return the label instance associated with this item, or nullptr. More...
 

Detailed Description

An item that represents an entry (usually an ImageStatisticsObject) for the QmitkImageStatisticsTreeModel.

Provides a hierarchical tree structure used internally by QmitkImageStatisticsTreeModel to display image statistics in a QTreeView.

Definition at line 30 of file QmitkImageStatisticsTreeItem.h.

Member Typedef Documentation

◆ ImageStatisticsObject

◆ StatisticNameVector

Constructor & Destructor Documentation

◆ QmitkImageStatisticsTreeItem() [1/3]

QmitkImageStatisticsTreeItem::QmitkImageStatisticsTreeItem ( )

Default constructor. Creates an empty item with no statistics data.

◆ QmitkImageStatisticsTreeItem() [2/3]

QmitkImageStatisticsTreeItem::QmitkImageStatisticsTreeItem ( const ImageStatisticsObject &  statisticsData,
const StatisticNameVector &  statisticNames,
QVariant  itemText,
bool  isWIP,
QmitkImageStatisticsTreeItem *  parentItem = nullptr,
const mitk::DataNode *  imageNode = nullptr,
const mitk::DataNode *  maskNode = nullptr,
const mitk::Label *  label = nullptr 
)
explicit

Construct a tree item holding actual statistics data.

Parameters
statisticsDataThe image statistics object containing the computed values.
statisticNamesNames of the statistics to display as columns.
itemTextDisplay text for this tree item.
isWIPTrue if the statistics are still being computed (work in progress).
parentItemOptional parent item in the tree hierarchy.
imageNodeOptional data node for the image.
maskNodeOptional data node for the mask.
labelOptional label associated with this item.

◆ QmitkImageStatisticsTreeItem() [3/3]

QmitkImageStatisticsTreeItem::QmitkImageStatisticsTreeItem ( const StatisticNameVector &  statisticNames,
QVariant  itemText,
bool  isWIP,
bool  isNA,
QmitkImageStatisticsTreeItem *  parentItem = nullptr,
const mitk::DataNode *  imageNode = nullptr,
const mitk::DataNode *  maskNode = nullptr,
const mitk::Label *  label = nullptr 
)
explicit

Construct a tree item without statistics data (e.g. a group header).

Parameters
statisticNamesNames of the statistics to display as columns.
itemTextDisplay text for this tree item.
isWIPTrue if the statistics are still being computed.
isNATrue if the statistics are not applicable for this item.
parentItemOptional parent item in the tree hierarchy.
imageNodeOptional data node for the image.
maskNodeOptional data node for the mask.
labelOptional label associated with this item.

◆ ~QmitkImageStatisticsTreeItem()

QmitkImageStatisticsTreeItem::~QmitkImageStatisticsTreeItem ( )

Member Function Documentation

◆ appendChild()

void QmitkImageStatisticsTreeItem::appendChild ( QmitkImageStatisticsTreeItem *  child)

Append a child item to this item.

Parameters
childThe child item to add. This item takes ownership.

◆ child()

QmitkImageStatisticsTreeItem* QmitkImageStatisticsTreeItem::child ( int  row)

Return the child item at the given row.

Parameters
rowThe row index.
Returns
The child item, or nullptr if out of range.

◆ childCount()

int QmitkImageStatisticsTreeItem::childCount ( ) const

Return the number of child items.

◆ columnCount()

int QmitkImageStatisticsTreeItem::columnCount ( ) const

Return the number of data columns.

◆ data()

QVariant QmitkImageStatisticsTreeItem::data ( int  column) const

Return the data for the given column.

Parameters
columnThe column index.
Returns
The data value as QVariant.

◆ GetLabelInstance()

mitk::Label::ConstPointer QmitkImageStatisticsTreeItem::GetLabelInstance ( ) const

Return the label instance associated with this item, or nullptr.

◆ isWIP()

bool QmitkImageStatisticsTreeItem::isWIP ( ) const

Indicate whether the statistics are still being computed (work in progress).

Returns true if the statistic container owned by this instance is only a dummy WIP container and the calculation of the up-to-date statistic is not yet finished.

◆ parentItem()

QmitkImageStatisticsTreeItem* QmitkImageStatisticsTreeItem::parentItem ( )

Return the parent item, or nullptr if this is the root.

◆ row()

int QmitkImageStatisticsTreeItem::row ( ) const

Return this item's row index within its parent.


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