|
vitrio 0.1.4
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 =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.
| 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 | How its samples map onto physical space. A format writes what of it it can carry and ignores the rest. |
| 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. |