vitrio 0.1.4
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
Loading...
Searching...
No Matches
detector_event_binning.hpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2
3#pragma once
4
5#include <vitrio/export.hpp>
6
7#include <cstddef>
8#include <vector>
9
10namespace vitrio
11{
12
13class detector_event_timeline_descriptor;
14
31{
32public:
39 VITRIO_API
40 explicit detector_event_binning(std::size_t factor);
41
42 VITRIO_API
44 VITRIO_API
46
47 VITRIO_API
49 operator=(const detector_event_binning &other) noexcept;
50
56 VITRIO_API
57 std::size_t get_factor() const noexcept;
58
69 VITRIO_API
70 std::vector<std::size_t>
72
73 friend bool operator==(
74 const detector_event_binning &lhs,
75 const detector_event_binning &rhs
76 ) noexcept
77 {
78 return lhs.m_factor == rhs.m_factor;
79 }
80
81 friend bool operator!=(
82 const detector_event_binning &lhs,
83 const detector_event_binning &rhs
84 ) noexcept
85 {
86 return !(lhs == rhs);
87 }
88
89private:
90 std::size_t m_factor;
91};
92
93} // namespace vitrio
How many pixels of a detector an image gathers into one, along each axis.
Definition detector_event_binning.hpp:31
std::vector< std::size_t > resolve(const detector_event_timeline_descriptor &events) const
Get how many position quanta a pixel of an image gathers.
detector_event_binning(std::size_t factor)
Construct a binning by a factor.
std::size_t get_factor() const noexcept
Get how many pixels of the detector are merged into one.
What is fixed for one acquisition of a detector that counts events: the grid its events are placed on...
Definition detector_event_timeline_descriptor.hpp:32