vitrio 0.3.1
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
Loading...
Searching...
No Matches
detector_event_image_reader.hpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2
3#pragma once
4
5#include <vitrio/detector_event_fractionation.hpp>
6#include <vitrio/export.hpp>
7#include <vitrio/platform.hpp>
8#include <vitrio/synchronous_image_reader.hpp>
9
10#include <memory>
11
12namespace vitrio
13{
14
17
35class VITRIO_API detector_event_image_reader final
36 : public synchronous_image_reader
37{
38public:
51 std::shared_ptr<const detector_event_timeline_reader> events,
52 detector_event_fractionation fractionation,
53 std::shared_ptr<const detector_event_renderer> renderer
54 );
55
57
64
65 const image_descriptor& get_descriptor() const noexcept override;
66
73 void read(
74 array_ref destination,
75 const image_transfer_plan &regions
76 ) const override;
77
78private:
79 class implementation;
80 VITRIO_STD_MEMBER_INTERFACE
81 std::unique_ptr<implementation> m_implementation;
82};
83
84} // namespace vitrio
A reference to a multidimensional array that does not keep it alive.
Definition array_ref.hpp:32
How the time of an acquisition is cut into fractions.
Definition detector_event_fractionation.hpp:28
const detector_event_fractionation & get_fractionation() const noexcept
Get the fractionation the acquisition is read with.
detector_event_image_reader(std::shared_ptr< const detector_event_timeline_reader > events, detector_event_fractionation fractionation, std::shared_ptr< const detector_event_renderer > renderer)
Construct a reader rendering the fractions of an acquisition.
const image_descriptor & get_descriptor() const noexcept override
Get the shape and data type of what the file holds.
void read(array_ref destination, const image_transfer_plan &regions) const override
Read a set of hyperrectangles of the file into one array, all before returning.
Abstract way of turning the events of a detector into an image.
Definition detector_event_renderer.hpp:34
Abstract read-only view of one acquisition of a detector that counts events.
Definition detector_event_timeline_reader.hpp:30
The shape and data type of the values an image file holds.
Definition image_descriptor.hpp:28
The regions to transfer between one file and one array.
Definition image_transfer_plan.hpp:34