|
vitrio 0.3.1
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
|
The ability of one image file format to be written. More...
#include <vitrio/image_file_write_format.hpp>
Public Member Functions | |
| image_file_write_format (const image_file_write_format &other)=delete | |
| image_file_write_format (image_file_write_format &&other)=delete | |
| image_file_write_format & | operator= (const image_file_write_format &other)=delete |
| image_file_write_format & | operator= (image_file_write_format &&other)=delete |
| virtual std::string | get_name () const =0 |
| Get the name of this format. | |
| virtual image_file_format_suitability | get_suitability (const image_file_probe &probe) const =0 |
| Report how well this format fits a file. | |
| virtual std::shared_ptr< image_writer > | open (const image_file_probe &probe, const image_descriptor &descriptor, const image_metadata &metadata, const file_transfer_pool &transfers) const =0 |
| Create a file and open it for writing. | |
The ability of one image file format to be written.
Judges from an image_file_probe how well it fits a file, and creates a file it fits, returning an image_writer for it.
|
pure virtual |
Get the name of this format.
|
pure virtual |
Report how well this format fits a file.
The file named by probe need not exist, in which case the probe carries no leading bytes and the decision rests on the extension alone. Check image_file_probe::exists rather than assuming there are leading bytes to read. A path that names a directory has none either, which image_file_probe::is_directory tells.
| probe | The file under consideration. |
probe.
|
pure virtual |
Create a file and open it for writing.
The descriptor is complete, so the file may be laid out in full before anything is written. Any file already at that path is replaced.
How the file lays its samples out is the format's own decision, so the shape comes as an image_descriptor, with no strides or offset.
| probe | The file to create. |
| descriptor | What the file holds. Its data type is what the file stores rather than what a write will supply, since a write converts. |
| metadata | What the file states beyond its shape and data type. A format writes what of it it can carry and leaves out the rest, so nothing in it makes the creation fail. |
| transfers | The threads that carry out the transfers of the writer. |
| unsupported_operation_error | If this format can not represent the requested file, such as a rank or a data type it has no encoding for. |
| image_file_error | If the file could not be created. |