jfjoch_viewer: Calibration working; ROI is super slow (need to clean-up the code!!!!)
Build Packages / build:rpm (ubuntu2404) (push) Has been cancelled
Build Packages / Generate python client (push) Has been cancelled
Build Packages / Build documentation (push) Has been cancelled
Build Packages / build:rpm (rocky8_sls9) (push) Has been cancelled
Build Packages / Unit tests (push) Has been cancelled
Build Packages / Create release (push) Has been cancelled
Build Packages / build:rpm (rocky8) (push) Has been cancelled
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Has been cancelled
Build Packages / build:rpm (rocky9_nocuda) (push) Has been cancelled
Build Packages / build:rpm (rocky8_nocuda) (push) Has been cancelled
Build Packages / build:rpm (rocky9) (push) Has been cancelled
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Has been cancelled
Build Packages / build:rpm (ubuntu2204) (push) Has been cancelled
Build Packages / build:rpm (ubuntu2404) (push) Has been cancelled
Build Packages / Generate python client (push) Has been cancelled
Build Packages / Build documentation (push) Has been cancelled
Build Packages / build:rpm (rocky8_sls9) (push) Has been cancelled
Build Packages / Unit tests (push) Has been cancelled
Build Packages / Create release (push) Has been cancelled
Build Packages / build:rpm (rocky8) (push) Has been cancelled
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Has been cancelled
Build Packages / build:rpm (rocky9_nocuda) (push) Has been cancelled
Build Packages / build:rpm (rocky8_nocuda) (push) Has been cancelled
Build Packages / build:rpm (rocky9) (push) Has been cancelled
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Has been cancelled
Build Packages / build:rpm (ubuntu2204) (push) Has been cancelled
This commit is contained in:
@@ -394,11 +394,12 @@ void JFJochImageReadingWorker::LoadCalibration(QString dataset) {
|
||||
|
||||
try {
|
||||
tmp->image = file_reader.ReadCalibration(tmp->buffer, dataset.toStdString());
|
||||
|
||||
std::shared_ptr<const SimpleImage> ctmp = tmp;
|
||||
emit simpleImageLoaded(ctmp);
|
||||
} catch (const std::exception &e) {
|
||||
logger.Info("Error loading calibration: {}", e.what());
|
||||
}
|
||||
}
|
||||
logger.Info("HTTP mode doesn't allow to read calibration (at the moment");
|
||||
} else
|
||||
logger.Info("HTTP mode doesn't allow to read calibration (at the moment");
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ signals:
|
||||
void imageNumberChanged(int64_t total_images, int64_t current_image);
|
||||
void setToolbarMode(JFJochViewerToolbarImage::ToolbarMode input);
|
||||
void setRings(const QVector<float> &v);
|
||||
void simpleImageLoaded(std::shared_ptr<const SimpleImage> &image);
|
||||
void simpleImageLoaded(std::shared_ptr<const SimpleImage> image);
|
||||
public:
|
||||
JFJochImageReadingWorker(const SpotFindingSettings &settings, const DiffractionExperiment& experiment, QObject *parent = nullptr);
|
||||
~JFJochImageReadingWorker() override = default;
|
||||
|
||||
@@ -317,6 +317,8 @@ JFJochViewerWindow::JFJochViewerWindow(QWidget *parent, bool dbus, const QString
|
||||
calibrationWindow, &JFJochCalibrationWindow::close);
|
||||
connect(calibrationWindow, &JFJochCalibrationWindow::closing,
|
||||
menuBar, &JFJochViewerMenu::calibrationWindowClosing);
|
||||
connect(calibrationWindow, &JFJochCalibrationWindow::loadCalibration,
|
||||
reading_worker, &JFJochImageReadingWorker::LoadCalibration);
|
||||
|
||||
connect(reading_worker, &JFJochImageReadingWorker::datasetLoaded,
|
||||
calibrationWindow, &JFJochCalibrationWindow::datasetLoaded);
|
||||
|
||||
@@ -51,8 +51,8 @@ void JFJochSimpleImageViewer::clear() {
|
||||
scene()->clear();
|
||||
}
|
||||
|
||||
void JFJochSimpleImageViewer::setImage(const std::shared_ptr<const SimpleImage> &img) {
|
||||
image_ = img;
|
||||
void JFJochSimpleImageViewer::setImage(std::shared_ptr<const SimpleImage> img) {
|
||||
image_ = std::move(img);
|
||||
has_image_ = true;
|
||||
renderImage();
|
||||
updateScene();
|
||||
|
||||
@@ -18,7 +18,7 @@ class JFJochSimpleImageViewer : public QGraphicsView {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit JFJochSimpleImageViewer(QWidget* parent = nullptr);
|
||||
void setImage(const std::shared_ptr<const SimpleImage> &img);
|
||||
void setImage(std::shared_ptr<const SimpleImage> img);
|
||||
void clear();
|
||||
|
||||
public slots:
|
||||
|
||||
@@ -84,7 +84,7 @@ void JFJochCalibrationWindow::datasetLoaded(std::shared_ptr<const JFJochReaderDa
|
||||
LoadMask();
|
||||
}
|
||||
|
||||
void JFJochCalibrationWindow::calibrationLoaded(std::shared_ptr<const SimpleImage> &image) {
|
||||
void JFJochCalibrationWindow::calibrationLoaded(std::shared_ptr<const SimpleImage> image) {
|
||||
viewer->setImage(image);
|
||||
}
|
||||
|
||||
|
||||
@@ -42,5 +42,5 @@ private slots:
|
||||
public slots:
|
||||
void open();
|
||||
void datasetLoaded(std::shared_ptr<const JFJochReaderDataset> in_dataset);
|
||||
void calibrationLoaded(std::shared_ptr<const SimpleImage> &image);
|
||||
void calibrationLoaded(std::shared_ptr<const SimpleImage> image);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user