From d56d96a0609c00972d818a7a917cdf263b47ddcd Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 1 Oct 2025 10:58:31 +0200 Subject: [PATCH] jfjoch_viewer: Display resolution estimate --- viewer/JFJochViewerImageStatistics.cpp | 12 ++++++++++++ viewer/JFJochViewerImageStatistics.h | 1 + 2 files changed, 13 insertions(+) diff --git a/viewer/JFJochViewerImageStatistics.cpp b/viewer/JFJochViewerImageStatistics.cpp index ce6bdda3..4f823321 100644 --- a/viewer/JFJochViewerImageStatistics.cpp +++ b/viewer/JFJochViewerImageStatistics.cpp @@ -80,6 +80,9 @@ JFJochViewerImageStatistics::JFJochViewerImageStatistics(QWidget *parent) : QWid indexed = new QLabel(this); layout->addRow(new QLabel("Indexing:"), indexed); + res_estimate = new QLabel(this); + layout->addRow(new QLabel("Resolution estimate:"), profile_radius); + profile_radius = new QLabel(this); layout->addRow(new QLabel("Profile radius:"), profile_radius); @@ -135,6 +138,7 @@ void JFJochViewerImageStatistics::loadImage(std::shared_ptrsetText(""); b_factor->setText(""); profile_radius->setText(""); + res_estimate->setText(""); return; } @@ -219,6 +223,14 @@ void JFJochViewerImageStatistics::loadImage(std::shared_ptrsetText("N/A"); } + auto res = image->ImageData().resolution_estimate; + if (res) { + text = QString("%1 Å").arg(QString::number(res.value(), 'f', 2)); + res_estimate->setText(text); + } else { + res_estimate->setText("N/A"); + } + if (!image->Dataset().indexing_result.empty()) { QString tooltip; diff --git a/viewer/JFJochViewerImageStatistics.h b/viewer/JFJochViewerImageStatistics.h index 773f8fab..0f60097d 100644 --- a/viewer/JFJochViewerImageStatistics.h +++ b/viewer/JFJochViewerImageStatistics.h @@ -21,6 +21,7 @@ class JFJochViewerImageStatistics : public QWidget { QLabel *valid_values; QLabel *indexed; QLabel *bkg_estimate; + QLabel *res_estimate; QLabel *b_factor; QLabel *profile_radius;