vitrio 0.1.4
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
Loading...
Searching...
No Matches
image_file_write_format_registry.hpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2
3#pragma once
4
5#include <vitrio/export.hpp>
6
7#include <memory>
8#include <vector>
9
10namespace vitrio
11{
12
13class image_file_write_format;
14class image_file_write_format_selector;
15
20using image_file_write_format_factory =
21 std::unique_ptr<image_file_write_format> (*)();
22
36{
37public:
39
43 ) = delete;
46 ) = delete;
48
50 operator=(const image_file_write_format_registry &other) = delete;
52 operator=(image_file_write_format_registry &&other) = delete;
53
60 VITRIO_API
61 void add(image_file_write_format_factory factory);
62
69 VITRIO_API
71
72private:
73 std::vector<image_file_write_format_factory> m_factories;
74};
75
76} // namespace vitrio
Collects image write format factories for bulk registration.
Definition image_file_write_format_registry.hpp:36
void add(image_file_write_format_factory factory)
Append a format factory to the registry.
void register_all(image_file_write_format_selector &selector) const
Instantiate one format per registered factory and register them into a selector.
Holds the image formats that can be written, selects the most suitable of them for a file,...
Definition image_file_write_format_selector.hpp:34
The ability of one image file format to be written.
Definition image_file_write_format.hpp:28