9e57219b31
ROIAzimuthal can now be restricted to an azimuthal-angle sector in addition to its Q/d range, enabling STXM-style directional ROIs. phi bounds are optional (both-or-neither); absent means a full 360 ring, so existing Q-only azimuthal ROIs are unchanged. - ROIElement::CheckROI gains a phi_deg argument; box/circle ignore it. - MarkROI gains an optional phi_map; ROIMap builds it from Phi_rad alongside the resolution map only when azimuthal ROIs are present. - phi bounds are normalized to [0,360) and wrap-around sectors are supported (phi_min > phi_max). - ROIConfigAzim carries phi_min/phi_max (kept trivially copyable for the union; phi_min == phi_max means full ring). No phi crosses the wire yet (CBOR/API wiring follows separately). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
23 lines
672 B
C++
23 lines
672 B
C++
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#pragma once
|
|
|
|
#include "ROIElement.h"
|
|
|
|
class ROICircle : public ROIElement {
|
|
float center_x;
|
|
float center_y;
|
|
float r_pxl;
|
|
float r_pxl_2;
|
|
public:
|
|
ROICircle(const std::string &name, float x, float y, float r_pxl);
|
|
~ROICircle() override = default;
|
|
|
|
[[nodiscard]] float GetX() const;
|
|
[[nodiscard]] float GetY() const;
|
|
[[nodiscard]] float GetRadius_pxl() const;
|
|
bool CheckROI(int64_t x, int64_t y, float resolution, float phi_deg) const override;
|
|
ROIConfig ExportMetadata() const override;
|
|
};
|