vitrio 0.3.1
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
Loading...
Searching...
No Matches
image_writer.hpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2
3#pragma once
4
5#include <vitrio/export.hpp>
6#include <vitrio/image_transfer_plan.hpp>
7
8#include <memory>
9
10namespace vitrio
11{
12
14class const_array;
16
27class VITRIO_API image_writer
28{
29public:
30 image_writer() noexcept;
31 image_writer(const image_writer &other) = delete;
32 image_writer(image_writer &&other) = delete;
33 virtual ~image_writer();
34
35 image_writer& operator=(const image_writer &other) = delete;
36 image_writer& operator=(image_writer &&other) = delete;
37
49 virtual const image_descriptor& get_descriptor() const noexcept = 0;
50
96 virtual void write_async(
97 const_array source,
98 image_transfer_plan regions,
99 std::shared_ptr<completion_notifier> done
100 ) = 0;
101
123 virtual void flush_async(
124 std::shared_ptr<completion_notifier> done
125 ) = 0;
126};
127
128} // namespace vitrio
Where a finished unit of work is reported.
Definition completion_notifier.hpp:20
A multidimensional array of numbers that cannot be written through.
Definition const_array.hpp:29
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
virtual const image_descriptor & get_descriptor() const noexcept=0
Get the shape and data type of the file.
virtual void flush_async(std::shared_ptr< completion_notifier > done)=0
Start making what has been written reach the storage.
virtual void write_async(const_array source, image_transfer_plan regions, std::shared_ptr< completion_notifier > done)=0
Start writing a set of hyperrectangles of the file from one array.