Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkImageStatisticsTreeItem.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef QmitkImageStatisticsTreeItem_h
14 #define QmitkImageStatisticsTreeItem_h
15 
16 #include <QList>
17 #include <QVariant>
18 
19 #include <mitkWeakPointer.h>
20 #include <mitkDataNode.h>
21 
23 
31 {
32 public:
35 
38 
51  explicit QmitkImageStatisticsTreeItem(const ImageStatisticsObject& statisticsData,
52  const StatisticNameVector& statisticNames, QVariant itemText, bool isWIP,
53  QmitkImageStatisticsTreeItem* parentItem = nullptr, const mitk::DataNode* imageNode = nullptr,
54  const mitk::DataNode* maskNode = nullptr, const mitk::Label* label = nullptr);
55 
68  explicit QmitkImageStatisticsTreeItem(const StatisticNameVector& statisticNames,
69  QVariant itemText, bool isWIP, bool isNA, QmitkImageStatisticsTreeItem *parentItem = nullptr, const mitk::DataNode* imageNode = nullptr,
70  const mitk::DataNode* maskNode = nullptr, const mitk::Label* label = nullptr);
71 
73 
79 
86 
88  int childCount() const;
89 
91  int columnCount() const;
92 
98  QVariant data(int column) const;
99 
101  int row() const;
102 
105 
112  bool isWIP() const;
113 
115  mitk::Label::ConstPointer GetLabelInstance() const;
116 
117 private:
118  ImageStatisticsObject m_statistics;
119  StatisticNameVector m_statisticNames;
120  QVariant m_ItemText;
121  QmitkImageStatisticsTreeItem *m_parentItem = nullptr;
122  QList<QmitkImageStatisticsTreeItem *> m_childItems;
126 
127  bool m_IsWIP;
128  bool m_NA;
129 };
130 
131 #endif
An item that represents an entry (usually an ImageStatisticsObject) for the QmitkImageStatisticsTreeM...
int columnCount() const
Return the number of data columns.
QmitkImageStatisticsTreeItem * child(int row)
Return the child item at the given row.
bool isWIP() const
Indicate whether the statistics are still being computed (work in progress).
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.
int childCount() const
Return the number of child items.
int row() const
Return this item's row index within its parent.
QVariant data(int column) const
Return the data for the given column.
QmitkImageStatisticsTreeItem()
Default constructor. Creates an empty item with no statistics data.
mitk::Label::ConstPointer GetLabelInstance() const
Return the label instance associated with this item, or nullptr.
void appendChild(QmitkImageStatisticsTreeItem *child)
Append a child item to this item.
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).
mitk::ImageStatisticsContainer::ImageStatisticsObject::StatisticNameVector StatisticNameVector
QmitkImageStatisticsTreeItem * parentItem()
Return the parent item, or nullptr if this is the root.
Central node class of the MITK data tree, associating a data object with properties and mappers.
Definition: mitkDataNode.h:72
Container class for storing the computed image statistics.
A data structure describing a label in a multi-label segmentation.
Definition: mitkLabel.h:101