vitrio 0.1.4
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
Loading...
Searching...
No Matches
detector_event_timeline_descriptor.hpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2
3#pragma once
4
5#include <vitrio/export.hpp>
6#include <vitrio/span.hpp>
7
8#include <cstddef>
9#include <cstdint>
10#include <vector>
11
12namespace vitrio
13{
14
32{
33public:
51 VITRIO_API
54 span<const std::size_t> subdivisions,
55 std::uint64_t time_extent,
56 double time_quantum
57 );
58
59 VITRIO_API
62 );
63 VITRIO_API
66 ) noexcept;
67 VITRIO_API
69
70 VITRIO_API
72 operator=(const detector_event_timeline_descriptor &other);
73 VITRIO_API
75 operator=(detector_event_timeline_descriptor &&other) noexcept;
76
82 VITRIO_API
83 std::size_t get_rank() const noexcept;
84
91 VITRIO_API
92 span<const std::size_t> get_extents() const noexcept;
93
101 VITRIO_API
102 span<const std::size_t> get_subdivisions() const noexcept;
103
109 VITRIO_API
110 std::uint64_t get_time_extent() const noexcept;
111
117 VITRIO_API
118 double get_time_quantum() const noexcept;
119
120 friend bool operator==(
123 ) noexcept
124 {
125 return
126 lhs.m_time_extent == rhs.m_time_extent &&
127 lhs.m_time_quantum == rhs.m_time_quantum &&
128 lhs.m_extents == rhs.m_extents &&
129 lhs.m_subdivisions == rhs.m_subdivisions;
130 }
131
132 friend bool operator!=(
135 ) noexcept
136 {
137 return !(lhs == rhs);
138 }
139
140private:
141 std::vector<std::size_t> m_extents;
142 std::vector<std::size_t> m_subdivisions;
143 std::uint64_t m_time_extent;
144 double m_time_quantum;
145};
146
147} // namespace vitrio
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
span< const std::size_t > get_extents() const noexcept
Get the extents of the grid of positions.
span< const std::size_t > get_subdivisions() const noexcept
Get how many position quanta a pixel of the detector spans.
double get_time_quantum() const noexcept
Get the length of one time quantum.
std::size_t get_rank() const noexcept
Get the number of axes events are placed along.
std::uint64_t get_time_extent() const noexcept
Get how many time quanta the acquisition spans.
detector_event_timeline_descriptor(span< const std::size_t > extents, span< const std::size_t > subdivisions, std::uint64_t time_extent, double time_quantum)
Construct a descriptor from its components.
A view of a contiguous sequence of elements.
Definition span.hpp:29