vitrio 0.3.1
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
Loading...
Searching...
No Matches
synchronous_image_reader.hpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2
3#pragma once
4
5#include <vitrio/export.hpp>
6#include <vitrio/image_reader.hpp>
7
8namespace vitrio
9{
10
11class array_ref;
12
21class VITRIO_API synchronous_image_reader
22 : public image_reader
23{
24public:
25 synchronous_image_reader() noexcept;
26 ~synchronous_image_reader() override;
27
34 array destination,
35 image_transfer_plan regions,
36 std::shared_ptr<completion_notifier> done
37 ) const final;
38
54 virtual void read(
55 array_ref destination,
56 const image_transfer_plan &regions
57 ) const = 0;
58};
59
60} // namespace vitrio
A reference to a multidimensional array that does not keep it alive.
Definition array_ref.hpp:32
A multidimensional array of numbers in host memory.
Definition array.hpp:37
The regions to transfer between one file and one array.
Definition image_transfer_plan.hpp:34
void read_async(array destination, image_transfer_plan regions, std::shared_ptr< completion_notifier > done) const final
Start reading a set of hyperrectangles of the file into one array.
virtual void read(array_ref destination, const image_transfer_plan &regions) const =0
Read a set of hyperrectangles of the file into one array, all before returning.