vitrio 0.1.4
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
Loading...
Searching...
No Matches
image_file_write_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_writer.hpp>
7#include <vitrio/platform.hpp>
8
9#include <memory>
10#include <string>
11
12namespace vitrio
13{
14
15class image_descriptor;
16class image_metadata;
17class image_file_probe;
18class image_file_write_format;
19
34{
35public:
42 ) = delete;
45 ) = delete;
47
49 operator=(const image_file_write_format_selector &other) = delete;
51 operator=(image_file_write_format_selector &&other) = delete;
52
62 static const std::shared_ptr<image_file_write_format_selector>&
64
69
77 bool register_format(std::unique_ptr<image_file_write_format> format);
78
93 std::shared_ptr<image_writer> open(
94 const std::string &path,
95 const image_descriptor &descriptor,
96 const image_metadata &metadata
97 ) const;
98
108
109private:
110 class implementation;
111 VITRIO_STD_MEMBER_INTERFACE
112 std::unique_ptr<implementation> m_implementation;
113};
114
115} // namespace vitrio
The shape and data type of the values an image file holds.
Definition image_descriptor.hpp:28
Inmutable brief representation of a file.
Definition image_file_probe.hpp:28
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
const image_file_write_format * get_most_suitable_format(const image_file_probe &probe) const
Get the format that would create a file, without creating it.
image_file_write_format_selector()
Construct a selector with no formats.
void register_builtin_formats()
Register the formats bundled with the library.
bool register_format(std::unique_ptr< image_file_write_format > format)
Register a new image write format.
std::shared_ptr< image_writer > open(const std::string &path, const image_descriptor &descriptor, const image_metadata &metadata) const
Create a file with the most suitable format.
static const std::shared_ptr< image_file_write_format_selector > & get_shared()
Get the selector every use may share.
The ability of one image file format to be written.
Definition image_file_write_format.hpp:28
What a file states beyond its shape and data type, such as how its samples map onto physical space.
Definition image_metadata.hpp:17