// SPDX-FileCopyrightText: 2026 Filip Leonarski, Paul Scherrer Institute // SPDX-License-Identifier: GPL-3.0-only #pragma once #include "../common/DetectorModules.h" #include "../common/DetectorOrientation.h" #include "../writer/HDF5Objects.h" // The group of module n, "/entry/instrument/detector/module_/" with n padded as the file pads it // (module_3 or module_03), or empty when the file has no such module. std::string NXmxModuleGroup(HDF5Object &file, size_t n); // The modules an NXmx file states, as WriteNXmxModules (writer/NXmxModules.h) writes them: groups // /entry/instrument/detector/module_0, module_1, ... (or module_00, module_01, ...). Their offsets are taken // relative to the image's pixel (0, 0) and in the detector plane; a module standing out of that plane (an // offset or pixel direction with a component along the detector normal) is refused. Fewer than two such groups: none. DetectorModules ReadNXmxModules(HDF5Object &file, double pixel_size_m, const DetectorOrientation &orientation);