vitrio 0.1.4
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
vitrio::detector_event_timeline_file_read_format Class Referenceabstract

The ability of one file format of detector events to be read. More...

#include <vitrio/detector_event_timeline_file_read_format.hpp>

Public Member Functions

 detector_event_timeline_file_read_format (const detector_event_timeline_file_read_format &other)=delete
 
 detector_event_timeline_file_read_format (detector_event_timeline_file_read_format &&other)=delete
 
detector_event_timeline_file_read_format & operator= (const detector_event_timeline_file_read_format &other)=delete
 
detector_event_timeline_file_read_format & operator= (detector_event_timeline_file_read_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< detector_event_timeline_reader > open (const image_file_probe &probe) const =0
 Open a file for reading.
 

Detailed Description

The ability of one file format of detector events to be read.

Judges from an image_file_probe how well it fits a file, and opens a file it fits as a detector_event_timeline_reader.

See also
image_file_read_format

Member Function Documentation

◆ get_name()

virtual std::string vitrio::detector_event_timeline_file_read_format::get_name ( ) const
pure virtual

Get the name of this format.

Returns
std::string The name, which identifies the format.

◆ get_suitability()

virtual image_file_format_suitability vitrio::detector_event_timeline_file_read_format::get_suitability ( const image_file_probe &  probe) const
pure virtual

Report how well this format fits a file.

Decide from probe alone, without opening the file: the probe carries its path, its lower case extension and its leading bytes.

Return image_file_format_suitability::unsupported for a file this format does not recognize, and something higher than image_file_format_suitability::normal only to displace another format that recognizes the same file.

Parameters
probeThe file under consideration.
Returns
image_file_format_suitability How well this format fits probe.

◆ open()

virtual std::shared_ptr< detector_event_timeline_reader > vitrio::detector_event_timeline_file_read_format::open ( const image_file_probe &  probe) const
pure virtual

Open a file for reading.

Precondition
get_suitability does not report probe as image_file_format_suitability::unsupported.
Parameters
probeThe file to open.
Returns
std::shared_ptr<detector_event_timeline_reader> The opened reader, never null.
Exceptions
image_file_errorIf the file can not be reached.
image_file_format_errorIf the file is malformed or truncated.

The documentation for this class was generated from the following file: