14 #ifndef QmitkImageStatisticsTreeModel_h
15 #define QmitkImageStatisticsTreeModel_h
43 void SetImageNodes(
const std::vector<mitk::DataNode::ConstPointer>& nodes);
44 void SetMaskNodes(
const std::vector<mitk::DataNode::ConstPointer>& nodes);
48 void SetIgnoreZeroValueVoxel(
bool _arg);
50 bool GetIgnoreZeroValueVoxel()
const;
53 void SetHistogramNBins(
unsigned int nbins);
55 unsigned int GetHistogramNBins()
const;
57 Qt::ItemFlags flags(
const QModelIndex &index)
const override;
58 QVariant data(
const QModelIndex &index,
int role)
const override;
59 QVariant headerData(
int section, Qt::Orientation orientation,
int role)
const override;
60 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
61 int columnCount(
const QModelIndex &parent = QModelIndex())
const override;
63 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex())
const override;
64 QModelIndex parent(
const QModelIndex &child)
const override;
94 void UpdateByDataStorage();
96 using StatisticsContainerVector = std::vector<mitk::ImageStatisticsContainer::ConstPointer>;
102 void BuildHierarchicalModel();
104 StatisticsContainerVector m_Statistics;
107 std::vector<mitk::DataNode::ConstPointer> m_ImageNodes;
113 std::vector<std::pair<mitk::DataNode::ConstPointer, unsigned int> > m_TimeStepResolvedImageNodes;
115 std::vector<mitk::DataNode::ConstPointer> m_MaskNodes;
117 std::vector<std::pair<mitk::DataNode::ConstPointer, unsigned int>> m_TimeStepResolvedMaskNodes;
118 std::vector<std::string> m_StatisticNames;
121 std::unique_ptr<QmitkImageStatisticsTreeItem> m_RootItem;
122 QVariant m_HeaderFirstColumn;
123 itk::TimeStamp m_BuildTime;
125 bool m_IgnoreZeroValueVoxel =
false;
126 unsigned int m_HistogramNBins = 100;