|
vitrio 0.1.4
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
|
A provider that serves files through a scratch. More...
#include <vitrio/scratch_image_reader_provider.hpp>


Public Member Functions | |
| 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. | |
Public Member Functions inherited from vitrio::image_reader_provider | |
| image_reader_provider (const image_reader_provider &other)=delete | |
| image_reader_provider (image_reader_provider &&other)=delete | |
| image_reader_provider & | operator= (const image_reader_provider &other)=delete |
| image_reader_provider & | operator= (image_reader_provider &&other)=delete |
A provider that serves files through a scratch.
It is a decorator over another provider: every file is asked of the backing provider. A file the scratch holds an entry of is served by a reader that reads from the entry what the entry holds and from the backing reader the rest. Any other file is served by the backing reader itself.
A reader served through an entry reports what the backing reader reports, and reads through the backing reader only what the entry does not hold.
| vitrio::scratch_image_reader_provider::scratch_image_reader_provider | ( | std::shared_ptr< image_reader_provider > | backing, |
| std::shared_ptr< image_scratch > | scratch | ||
| ) |
Construct a provider serving through a scratch.
| backing | The provider asked for the files themselves. |
| scratch | What is held of the files, which reading through this provider adds to. |
| std::invalid_argument | If backing or scratch is null. |
|
overridevirtual |
Get the reader a key names.
Shared ownership rather than a reference, so that a reader the provider stops keeping stays alive for as long as it is still read through.
| key | Key of the file to read, such as its path. |
| image_file_error | If the file does not exist or can not be read. |
| unsupported_operation_error | If no format can read the file. |
| image_file_format_error | If the file is malformed or truncated. |
Implements vitrio::image_reader_provider.