|
vitrio 0.1.4
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
|
A view of the positions of a sequence of events, as a matrix of one row per event and one column per axis. More...
#include <vitrio/detector_event_position_view.hpp>
Public Member Functions | |
| detector_event_position_view (span< const std::uint32_t > coordinates, std::size_t rank) | |
| Construct a view of coordinates held row after row. | |
| std::size_t | get_rank () const noexcept |
| Get the number of coordinates each event carries. | |
| std::size_t | get_event_count () const noexcept |
| Get the number of events viewed. | |
| bool | empty () const noexcept |
| Check whether no event is viewed. | |
| span< const std::uint32_t > | get (std::size_t event) const noexcept |
| Get the position of one event. | |
| std::uint32_t | operator() (std::size_t event, std::size_t axis) const noexcept |
| Get one coordinate of one event. | |
| detector_event_position_view | get_events (std::size_t first, std::size_t count) const noexcept |
| Get the positions of a run of the events viewed. | |
| span< const std::uint32_t > | get_coordinates () const noexcept |
| Get every coordinate viewed, row after row. | |
A view of the positions of a sequence of events, as a matrix of one row per event and one column per axis.
The coordinates are held row after row, those of one event after those of the one before, slowest axis first within a row. Each is counted in the position quanta of a detector_event_timeline_descriptor.
A view is a pointer, a size and a rank, as cheap to copy as a span, and what it views must outlive it. It never owns or changes the coordinates.
| vitrio::detector_event_position_view::detector_event_position_view | ( | span< const std::uint32_t > | coordinates, |
| std::size_t | rank | ||
| ) |
Construct a view of coordinates held row after row.
| coordinates | The coordinates of every event, those of one event after another. |
| rank | Number of coordinates each event carries. |
| std::invalid_argument | If rank is zero, or if the number of coordinates is not a multiple of it. |
|
noexcept |
Check whether no event is viewed.
|
noexcept |
Get the position of one event.
| event | Index of the event. Must be below get_event_count. |
|
noexcept |
Get every coordinate viewed, row after row.
For walking every event at once, where indexing them one by one would cost more than it says.
|
noexcept |
Get the number of events viewed.
|
noexcept |
Get the positions of a run of the events viewed.
| first | Index of the first event of the run. |
| count | Number of events from there. The run must not reach past get_event_count. |
|
noexcept |
Get the number of coordinates each event carries.
|
noexcept |
Get one coordinate of one event.
| event | Index of the event. Must be below get_event_count. |
| axis | Index of the axis. Must be below get_rank. |