Mercurial > hg > svcore
diff data/model/EditableDenseThreeDimensionalModel.cpp @ 886:48410857b03c
Add bin-values and bin-value unit to EditableDense3DModel
author | Chris Cannam |
---|---|
date | Thu, 06 Feb 2014 18:26:18 +0000 |
parents | e802e550a1f2 |
children | 59e7fe1b1003 |
line wrap: on
line diff
--- a/data/model/EditableDenseThreeDimensionalModel.cpp Thu Feb 06 15:31:16 2014 +0000 +++ b/data/model/EditableDenseThreeDimensionalModel.cpp Thu Feb 06 18:26:18 2014 +0000 @@ -410,6 +410,37 @@ } bool +EditableDenseThreeDimensionalModel::hasBinValues() const +{ + return !m_binValues.empty(); +} + +float +EditableDenseThreeDimensionalModel::getBinValue(size_t n) const +{ + if (n < m_binValues.size()) return m_binValues[n]; + else return 0.f; +} + +void +EditableDenseThreeDimensionalModel::setBinValues(std::vector<float> values) +{ + m_binValues = values; +} + +QString +EditableDenseThreeDimensionalModel::getBinValueUnit() const +{ + return m_binValueUnit; +} + +void +EditableDenseThreeDimensionalModel::setBinValueUnit(QString unit) +{ + m_binValueUnit = unit; +} + +bool EditableDenseThreeDimensionalModel::shouldUseLogValueScale() const { QReadLocker locker(&m_lock);