MCPcopy Create free account
hub / github.com/MITK/MITK / data

Method data

Modules/ImageStatisticsUI/src/QmitkImageStatisticsTreeItem.cpp:84–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82};
83
84QVariant QmitkImageStatisticsTreeItem::data(int column) const
85{
86 QVariant result;
87 if (column > 0 && !m_statisticNames.empty())
88 {
89 if (column - 1 < static_cast<int>(m_statisticNames.size()))
90 {
91 if (m_IsWIP)
92 {
93 result = QVariant(QString("..."));
94 }
95 else if (m_NA)
96 {
97 result = QVariant(QString("N/A"));
98 }
99 else
100 {
101 auto statisticKey = m_statisticNames.at(column - 1);
102 if (m_statistics.HasStatistic(statisticKey))
103 {
104 return boost::apply_visitor(StatValueVisitor(), m_statistics.GetValueNonConverted(statisticKey));
105 }
106 else
107 {
108 return QVariant();
109 }
110 }
111 }
112 else
113 {
114 return QVariant();
115 }
116 }
117 else if (column == 0)
118 {
119 result = m_ItemText;
120 }
121 return result;
122}
123
124QmitkImageStatisticsTreeItem *QmitkImageStatisticsTreeItem::parentItem()
125{

Callers 1

IterateMethod · 0.45

Calls 7

StatValueVisitorClass · 0.85
atMethod · 0.80
HasStatisticMethod · 0.80
GetValueNonConvertedMethod · 0.80
QStringClass · 0.50
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected