vitrio 0.1.4
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
Loading...
Searching...
No Matches
image_file_read_format_selector.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#include <vitrio/platform.hpp>
8
9#include <memory>
10#include <string>
11
12namespace vitrio
13{
14
15class image_file_probe;
16class image_file_read_format;
17
31class VITRIO_API image_file_read_format_selector final
32{
33public:
40 ) = delete;
43 ) = delete;
45
47 operator=(const image_file_read_format_selector &other) = delete;
49 operator=(image_file_read_format_selector &&other) = delete;
50
60 static const std::shared_ptr<image_file_read_format_selector>& get_shared();
61
66
74 bool register_format(std::unique_ptr<image_file_read_format> format);
75
92 std::shared_ptr<image_reader> open(const std::string &path) const;
93
106
107private:
108 class implementation;
109 VITRIO_STD_MEMBER_INTERFACE
110 std::unique_ptr<implementation> m_implementation;
111};
112
113} // namespace vitrio
Inmutable brief representation of a file.
Definition image_file_probe.hpp:28
Holds the image formats that can be read, selects the most suitable of them for a file,...
Definition image_file_read_format_selector.hpp:32
std::shared_ptr< image_reader > open(const std::string &path) const
Open a file for reading with the most suitable format.
const image_file_read_format * get_most_suitable_format(const image_file_probe &probe) const
Get the format that would open a file, without opening it.
void register_builtin_formats()
Register the formats bundled with the library.
bool register_format(std::unique_ptr< image_file_read_format > format)
Register a new image read format.
static const std::shared_ptr< image_file_read_format_selector > & get_shared()
Get the selector every use may share.
image_file_read_format_selector()
Construct a selector with no formats.
The ability of one image file format to be read.
Definition image_file_read_format.hpp:26