vitrio 0.3.1
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
Loading...
Searching...
No Matches
executor_image_saver.hpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2
3#pragma once
4
5#include <vitrio/export.hpp>
6#include <vitrio/image_saver.hpp>
7#include <vitrio/platform.hpp>
8
9#include <memory>
10
11namespace vitrio
12{
13
14class completion;
15class const_array;
16class executor;
17
21
35class VITRIO_API executor_image_saver final
36 : public image_saver
37{
38public:
48 std::shared_ptr<image_writer_provider> writers,
49 std::shared_ptr<vitrio::executor> executor
50 );
51
52 ~executor_image_saver() override;
53
54 std::shared_ptr<completion> save(
55 const_array source,
56 const image_transaction_plan &plan,
57 std::shared_ptr<const image_transfer_sanitizer> sanitizer
58 ) const override;
59
60private:
61 VITRIO_STD_MEMBER_INTERFACE
62 std::shared_ptr<image_writer_provider> m_writers;
63 VITRIO_STD_MEMBER_INTERFACE
64 std::shared_ptr<vitrio::executor> m_executor;
65};
66
67} // namespace vitrio
A query-only view of whether one or more units of work have finished.
Definition completion.hpp:18
A multidimensional array of numbers that cannot be written through.
Definition const_array.hpp:29
executor_image_saver(std::shared_ptr< image_writer_provider > writers, std::shared_ptr< vitrio::executor > executor)
Construct a saver over a provider and an executor.
std::shared_ptr< completion > save(const_array source, const image_transaction_plan &plan, std::shared_ptr< const image_transfer_sanitizer > sanitizer) const override
Save every region a transaction plan names.
Where a task is handed off to run, now or later.
Definition executor.hpp:26
List of regions to transfer between many files and one array.
Definition image_transaction_plan.hpp:33
Decides what becomes of the regions of a plan that do not fit the file or the array they join.
Definition image_transfer_sanitizer.hpp:30
Interface to serve image_writer given a key.
Definition image_writer_provider.hpp:25