vitrio 0.3.1
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
17class image_metadata;
20
35{
36public:
43 ) = delete;
46 ) = delete;
48
50 operator=(const image_file_write_format_selector &other) = delete;
52 operator=(image_file_write_format_selector &&other) = delete;
53
63 static const std::shared_ptr<image_file_write_format_selector>&
65
70
78 bool register_format(std::unique_ptr<image_file_write_format> format);
79
96 std::shared_ptr<image_writer> open(
97 const std::string &path,
98 const image_descriptor &descriptor,
99 const image_metadata &metadata,
100 const file_transfer_pool &transfers
101 ) const;
102
112
113private:
114 class implementation;
115 VITRIO_STD_MEMBER_INTERFACE
116 std::unique_ptr<implementation> m_implementation;
117};
118
119} // namespace vitrio
Threads that carry out the reads and writes of files, each many at once, and hand the computations th...
Definition file_transfer_pool.hpp:30
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:33
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.
static const std::shared_ptr< image_file_write_format_selector > & get_shared()
Get the selector every use may share.
std::shared_ptr< image_writer > open(const std::string &path, const image_descriptor &descriptor, const image_metadata &metadata, const file_transfer_pool &transfers) const
Create a file with the most suitable format.
The ability of one image file format to be written.
Definition image_file_write_format.hpp:29
What an image file states beyond its shape and data type, such as the distance between its samples.
Definition image_metadata.hpp:35