224cc8b89c
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 7m46s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 8m45s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 6m56s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 5m58s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 6m59s
Build Packages / build:rpm (rocky8) (push) Successful in 7m33s
Build Packages / Generate python client (push) Successful in 19s
Build Packages / Build documentation (push) Successful in 41s
Build Packages / Create release (push) Has been skipped
Build Packages / build:rpm (rocky9) (push) Successful in 8m45s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 7m51s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 7m12s
Build Packages / Unit tests (push) Successful in 1h8m51s
This is an UNSTABLE release. * jfjoch_broker: Add auto-contrast option for preview images * Frontend: Add logo image * jfjoch_viewer: Add logo image * jfjoch_viewer: For image chart allow to set min value to zero * jfjoch_viewer: For resolution estimation plots, visualization uses 1/d^2 as measure * jfjoch_viewer: Add 3D unit cell visualization (experimental/WIP/not really there) * Documentation: Add logo image Reviewed-on: #16 Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch> Co-committed-by: Filip Leonarski <filip.leonarski@psi.ch>
41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#ifndef JFJOCH_LATTICEVISUALIZERWIDGET_H
|
|
#define JFJOCH_LATTICEVISUALIZERWIDGET_H
|
|
|
|
#include <QWidget>
|
|
#include <Qt3DExtras/Qt3DWindow>
|
|
#include <Qt3DCore/QEntity>
|
|
#include <Qt3DCore/QTransform>
|
|
#include <Qt3DExtras/QPhongMaterial>
|
|
#include "../../reader/JFJochReaderImage.h"
|
|
|
|
class LatticeVisualizerWidget : public QWidget {
|
|
Q_OBJECT
|
|
|
|
Qt3DExtras::Qt3DWindow *view;
|
|
Qt3DCore::QEntity *rootEntity;
|
|
|
|
struct LatticeBar {
|
|
Qt3DCore::QEntity *entity;
|
|
Qt3DCore::QTransform *transform;
|
|
Qt3DExtras::QPhongMaterial *material;
|
|
};
|
|
|
|
LatticeBar bars[3];
|
|
|
|
void createBar(int index, const QColor &color);
|
|
void updateBar(int index, float x, float y, float z);
|
|
// matrix is 3x3, row-major (a_x, a_y, a_z, b_x, ...) or 3 vectors
|
|
void setLattice(const float matrix[9]);
|
|
|
|
public:
|
|
explicit LatticeVisualizerWidget(QWidget *parent = nullptr);
|
|
|
|
public slots:
|
|
void loadImage(std::shared_ptr<const JFJochReaderImage> image);
|
|
};
|
|
|
|
|
|
#endif //JFJOCH_LATTICEVISUALIZERWIDGET_H
|