vitrio 0.3.1
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
15
20using image_file_write_format_factory =
21 std::unique_ptr<image_file_write_format> (*)();
22
35class image_file_write_format_registry
36{
37public:
38 using format_type = image_file_write_format;
39
40 VITRIO_API image_file_write_format_registry();
41 image_file_write_format_registry(
42 const image_file_write_format_registry &other
43 ) = delete;
44 image_file_write_format_registry(
45 image_file_write_format_registry &&other
46 ) = delete;
47 VITRIO_API ~image_file_write_format_registry();
48
49 image_file_write_format_registry&
50 operator=(const image_file_write_format_registry &other) = delete;
51 image_file_write_format_registry&
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
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:35
The ability of one image file format to be written.
Definition image_file_write_format.hpp:29