diff options
Diffstat (limited to 'src/profile.cpp')
| -rw-r--r-- | src/profile.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/profile.cpp b/src/profile.cpp index 101ecf3..9a65730 100644 --- a/src/profile.cpp +++ b/src/profile.cpp @@ -5,10 +5,9 @@ #include <QDebug> #include <QJsonArray> -Profile::Profile( - const Pixels& pixels, - const CalibrationTablePtr calibrationTableZ, - const CalibrationTablePtr calibrationTableX) +Profile::Profile(const Pixels &pixels, + const op::CalibrationTablePtr calibrationTableZ, + const op::CalibrationTablePtr calibrationTableX) : m_counters(pixels.counters) { // if (!calibrationTableZ || !calibrationTableX) { @@ -41,7 +40,7 @@ Profile::Profile( qt_noop(); } const auto pixelDiscrete = pixel * discretesInRage / img_height; - if (Q_UNLIKELY(pixel >= sizeof(CalibrationColumn) / sizeof(float))) { + if (Q_UNLIKELY(pixel >= sizeof(op::CalibrationColumn) / sizeof(float))) { qWarning() << "got invalid calibration pixel at" << i << ":" << pixel; m_counters = {}; @@ -49,7 +48,7 @@ Profile::Profile( return; } - if (Q_UNLIKELY(pixel == sizeof(CalibrationColumn) - 1)) { + if (Q_UNLIKELY(pixel == sizeof(op::CalibrationColumn) - 1)) { qDebug() << "Profile: got edge value"; const auto& z = calibrationTableZ->at(i).at(pixelDiscrete); @@ -86,9 +85,9 @@ Profile::Profile( continue; } - // const auto x = (leftMmX * (1 - fract) + rightMmX * fract); + const auto x = (leftMmX * (1 - fract) + rightMmX * fract); // TODO: revert this debug shit - const auto x = static_cast<double>(i) - img_width / 2; + // const auto x = static_cast<double>(i) - img_width / 2; m_pointsMm.at(i) = {x, z}; |
