| 61 | } |
| 62 | |
| 63 | struct StatValueVisitor : boost::static_visitor<QVariant> |
| 64 | { |
| 65 | QVariant operator()(const mitk::ImageStatisticsContainer::RealType& val) const |
| 66 | { |
| 67 | return QVariant(val); |
| 68 | } |
| 69 | |
| 70 | QVariant operator()(const mitk::ImageStatisticsContainer::VoxelCountType& val) const |
| 71 | { |
| 72 | return QVariant::fromValue<mitk::ImageStatisticsContainer::VoxelCountType>(val); |
| 73 | } |
| 74 | |
| 75 | QVariant operator()(const mitk::ImageStatisticsContainer::IndexType& val) const |
| 76 | { |
| 77 | std::stringstream ss; |
| 78 | ss << val; |
| 79 | return QVariant(QString::fromStdString(ss.str())); |
| 80 | } |
| 81 | |
| 82 | }; |
| 83 | |
| 84 | QVariant QmitkImageStatisticsTreeItem::data(int column) const |
| 85 | { |