// SPDX-FileCopyrightText: 2026 Filip Leonarski, Paul Scherrer Institute // SPDX-License-Identifier: GPL-3.0-only #pragma once #include #include #include "DetectorModules.h" // One panel's box in the image rugnux reads, x0 <= x < x1, y0 <= y < y1, and its id in DetectorModules // (-1 for the one panel of an empty table). What the neighbourhood algorithms on the image - the spot // finders' windows, the connected-component search, the squares read about a spot - stay inside, the way // the FPGA spot finder stays inside a JUNGFRAU module: stacked panels lie next to each other in the image // and far apart on the detector. struct PanelBox { int32_t x0, y0, x1, y1; int32_t panel; }; // One box per panel. An empty table gives one box, the whole image, so whatever is clamped to it is // clamped to the image exactly as without panels. std::vector PanelBoxes(const DetectorModules &modules, int64_t width, int64_t height);