vitrio 0.1.4
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
Loading...
Searching...
No Matches
scratch_image_reader_provider.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_provider.hpp>
7#include <vitrio/platform.hpp>
8
9#include <memory>
10#include <string>
11
12namespace vitrio
13{
14
15class image_scratch;
16
31{
32public:
42 std::shared_ptr<image_reader_provider> backing,
43 std::shared_ptr<image_scratch> scratch
44 );
45
47
48 std::shared_ptr<const image_reader>
49 acquire(const std::string &key) override;
50
51private:
52 VITRIO_STD_MEMBER_INTERFACE
53 std::shared_ptr<image_reader_provider> m_backing;
54 VITRIO_STD_MEMBER_INTERFACE
55 std::shared_ptr<image_scratch> m_scratch;
56};
57
58} // namespace vitrio
Interface to serve image_reader given a key.
Definition image_reader_provider.hpp:26
A provider that serves files through a scratch.
Definition scratch_image_reader_provider.hpp:31
scratch_image_reader_provider(std::shared_ptr< image_reader_provider > backing, std::shared_ptr< image_scratch > scratch)
Construct a provider serving through a scratch.
std::shared_ptr< const image_reader > acquire(const std::string &key) override
Get the reader a key names.
A view of a contiguous sequence of elements.
Definition span.hpp:29