Files
Jungfraujoch/viewer/widgets/JFJochDiffractionImage.h
Filip Leonarski 8609fae991
All checks were successful
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 10m58s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 11m45s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 12m17s
Build Packages / Generate python client (push) Successful in 32s
Build Packages / Build documentation (push) Successful in 47s
Build Packages / Create release (push) Has been skipped
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 13m15s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 13m9s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 13m7s
Build Packages / build:rpm (rocky8) (push) Successful in 13m17s
Build Packages / build:rpm (rocky9) (push) Successful in 13m46s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 7m8s
Build Packages / Unit tests (push) Successful in 53m27s
jfjoch_viewer: JFJochImage works fine (though performance is unlikely improved much)
2025-11-07 20:55:16 +01:00

64 lines
1.6 KiB
C++

// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#pragma once
#include "JFJochImage.h"
#include "../../reader/JFJochReaderImage.h"
class JFJochDiffractionImage : public JFJochImage {
Q_OBJECT
QColor spot_color = Qt::green;
QColor prediction_color = Qt::darkRed;
QColor ice_ring_color = Qt::cyan;
public:
JFJochDiffractionImage(QWidget *parent = nullptr);
private:
void addCustomOverlay() override;
void LoadImageInternal();
void DrawResolutionRings();
void DrawSpots();
void DrawPredictions();
void DrawBeamCenter();
void DrawTopPixels();
void DrawSaturation();
void DrawCross(float x, float y, float size, float width, float z = 1);
std::shared_ptr<const JFJochReaderImage> image;
int32_t show_highest_pixels = 0;
QVector<float> res_ring = {};
bool res_ring_auto = false;
bool show_spots = true;
bool show_predictions = false;
bool highlight_ice_rings = true;
float ice_ring_width_Q_recipA = 0.01;
void mouseHover(QMouseEvent* event) override;
public slots:
void loadImage(std::shared_ptr<const JFJochReaderImage> image);
void setAutoForeground(bool input);
void setResolutionRing(QVector<float> v);
void setResolutionRingAuto();
void showSpots(bool input);
void showPredictions(bool input);
void setSpotColor(QColor input);
void setPredictionColor(QColor input);
void showHighestPixels(int32_t v);
void showSaturation(bool input);
void highlightIceRings(bool input);
};