Commit Graph

11 Commits

Author SHA1 Message Date
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 4dbbf0e365 v1.0.0-rc.97
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 8m11s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 9m9s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 9m18s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 10m14s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 10m3s
Build Packages / Generate python client (push) Successful in 15s
Build Packages / Build documentation (push) Successful in 50s
Build Packages / Create release (push) Has been skipped
Build Packages / build:rpm (rocky8) (push) Successful in 8m31s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 8m21s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 7m42s
Build Packages / build:rpm (rocky9) (push) Successful in 9m11s
Build Packages / Unit tests (push) Failing after 1h13m19s
This is an UNSTABLE release and not recommended for production use (please use rc.96 instead).

* jfjoch_broker: For DECTRIS detectors add dark data collection during initialization for bad pixel mask
* jfjoch_broker: Refactor of calibration logic for more clear code (likely to introduce problems)
* jfjoch_viewer: Add option to handle user pixel mask (experimental)
* jfjoch_viewer: More options for ROI
* jfjoch_viewer: Add window to display calibration

Reviewed-on: #2
Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
Co-committed-by: Filip Leonarski <filip.leonarski@psi.ch>
2025-11-09 12:42:27 +01:00
leonarski_f 061152279c v1.0.0-rc.91 2025-10-20 20:43:44 +02:00
leonarski_f 5d9d2de4a4 v1.0.0-rc.81 2025-09-21 19:27:51 +02:00
leonarski_f c67337cfe1 v1.0.0-rc.72 2025-09-08 20:28:59 +02:00
leonarski_f bb32f27635 v1.0.0-rc.70 2025-08-27 06:21:10 +02:00
leonarski_f fa95858008 v1.0.0-rc.69 2025-08-17 21:21:20 +02:00
leonarski_f 06c5b9cf7f 1.0.0-rc.65 2025-07-16 20:19:48 +02:00
leonarski_f 0d1b388f4d v1.0.0-rc.50 2025-06-20 09:52:26 +02:00
leonarski_f 41a3e671f4 v1.0.0-rc.41 2025-06-10 18:14:04 +02:00