Commit Graph

5 Commits

Author SHA1 Message Date
leonarski_f 58c60e03fe viewer: Phase 1b — inline MX/AzInt settings dock
Surface a surgical subset of processing settings in an always-visible dock
instead of hidden windows:

- New JFJochViewerSettingsDock with an MX / AzInt segmented toggle.
  MX page: geometry (energy, distance, beam X/Y), a new unit-cell +
  space-group editor (no such input existed before; enables known-cell
  ffbidx), spot finding (S/N, photon count, min pixels/spot), indexing
  algorithm and geometry refinement. AzInt page: q range / spacing /
  azimuthal bins plus the existing powder-calibration widget.
- Edits feed straight into the worker (UpdateSpotFindingSettings,
  UpdateAzintSettings, UpdateDataset, FindCenter); fields populate from the
  loaded dataset.
- Add CeO2 and Silicon calibrant presets.
- Dock it left, objectName "settingsDock", show it in the Processing
  perspective (hidden in Image).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 16:26:15 +02:00
leonarski_f 5d9e1be814 portability: replace M_PI / std::numbers::pi with a host+device-safe PI
M_PI is a POSIX <math.h> extension that MSVC does not define without
_USE_MATH_DEFINES. std::numbers::pi (introduced in the viewer guard commit) is
C++20, but CUDA here is compiled as C++17 (CMAKE_CUDA_STANDARD 17) and several
common/ headers are pulled into .cu device translation units, so std::numbers is
not available there.

Add common/JFJochMath.h with a dependency-free `constexpr double PI` that works
in host code (including MSVC), in CUDA device code, and under C++17/20, and use
it everywhere:
- common/ and image_analysis/ (incl. CUDA .cu): 78 M_PI occurrences, 22 files
- broker/OpenAPIConvert.cpp
- viewer/: the 5 files that used std::numbers::pi now use PI, for one consistent
  convention across the codebase

Verified to build: JFJochImageAnalysis (incl. CUDA), jfjoch_viewer, JFJochBroker.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 14:54:01 +02:00
leonarski_f ec1308f4a9 viewer: guard Linux-only constructs for Windows/MSVC builds
Step toward building jfjoch_viewer on Windows/MSVC. No change to the Linux
build: D-Bus stays on by default and the XCB plugin is still used.

- CMake: make Qt6::DBus optional via JFJOCH_VIEWER_DBUS (ON on Linux, OFF on
  Windows/macOS where Qt6::DBus does not exist); compile/link/install the dbus/
  adaptor + service file only when enabled. Select the platform integration
  plugin per-OS (QXcb on Linux, QWindows on Windows, QCocoa on macOS) instead
  of hard-coding QXcbIntegrationPlugin.
- JFJochViewerWindow: wrap the adaptor include and D-Bus registration in
  #ifdef JFJOCH_VIEWER_DBUS.
- JFJochImageReadingWorker: the POSIX open()/fstat()/NFS-errno preflight is now
  #ifndef _WIN32, with a portable QFileInfo fallback elsewhere; POSIX-only
  headers are guarded too.
- Replace the POSIX M_PI/M_PI_2 extension with C++20 std::numbers::pi across the
  viewer (not defined by MSVC without _USE_MATH_DEFINES).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 13:50:49 +02:00
leonarski_f 224cc8b89c v1.0.0-rc.110 (#16)
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>
2025-11-28 12:47:35 +01:00
leonarski_f a6b5cb5629 v1.0.0-rc.105 (#10)
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 8m0s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 7m30s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 7m54s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 8m41s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 8m19s
Build Packages / build:rpm (rocky8) (push) Successful in 8m8s
Build Packages / Generate python client (push) Successful in 13s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 7m57s
Build Packages / Create release (push) Has been skipped
Build Packages / Build documentation (push) Successful in 30s
Build Packages / build:rpm (rocky9) (push) Successful in 9m0s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 6m54s
Build Packages / Unit tests (push) Successful in 1h10m42s
This is an UNSTABLE release.

* jfjoch_viewer: Clean-up widgets slightly
* jfjoch_viewer: Limit right panel to 600 pixels
* jfjoch_viewer: Parse crystal symmetry type
* jfjoch_viewer: Grid scan view takes color map and can be fit to zoom

Reviewed-on: #10
Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
Co-committed-by: Filip Leonarski <filip.leonarski@psi.ch>
2025-11-20 09:46:25 +01:00