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_image_reader_provider Class Referencefinal

A provider that reads acquisitions of detector events as movies, each fraction of an acquisition rendered into one image. More...

#include <vitrio/detector_event_image_reader_provider.hpp>

Inheritance diagram for vitrio::detector_event_image_reader_provider:
Inheritance graph
[legend]
Collaboration diagram for vitrio::detector_event_image_reader_provider:
Collaboration graph
[legend]

Public Member Functions

 detector_event_image_reader_provider (std::shared_ptr< detector_event_timeline_reader_provider > events, detector_event_fractionation fractionation, std::shared_ptr< const detector_event_renderer > renderer)
 Construct a provider rendering acquisitions as given.
 
std::shared_ptr< const image_reader > acquire (const std::string &key) override
 Get the reader a key names.
 
- Public Member Functions inherited from vitrio::image_reader_provider
 image_reader_provider (const image_reader_provider &other)=delete
 
 image_reader_provider (image_reader_provider &&other)=delete
 
image_reader_provider & operator= (const image_reader_provider &other)=delete
 
image_reader_provider & operator= (image_reader_provider &&other)=delete
 

Detailed Description

A provider that reads acquisitions of detector events as movies, each fraction of an acquisition rendered into one image.

Every acquisition it serves is cut by one fractionation and rendered by one renderer, which are what the provider is constructed with: how an acquisition becomes images is chosen by whoever reads it, not by the file it is in, so it is stated where readers are made rather than registered with a format.

A key means whatever it means to the provider of the acquisitions, which every key is handed to. It keeps nothing: every reader it returns is newly made, which caching_image_reader_provider can be put in front of.

See also
detector_event_image_reader

Constructor & Destructor Documentation

◆ detector_event_image_reader_provider()

vitrio::detector_event_image_reader_provider::detector_event_image_reader_provider ( std::shared_ptr< detector_event_timeline_reader_provider >  events,
detector_event_fractionation  fractionation,
std::shared_ptr< const detector_event_renderer >  renderer 
)

Construct a provider rendering acquisitions as given.

Parameters
eventsWhere the acquisitions come from.
fractionationHow the time of an acquisition is cut into fractions.
rendererHow a fraction is turned into an image.
Exceptions
std::invalid_argumentIf events or renderer is null.

Member Function Documentation

◆ acquire()

std::shared_ptr< const image_reader > vitrio::detector_event_image_reader_provider::acquire ( const std::string &  key)
overridevirtual

Get the reader a key names.

Shared ownership rather than a reference, so that a reader the provider stops keeping stays alive for as long as it is still read through.

Parameters
keyKey of the file to read, such as its path.
Returns
std::shared_ptr<const image_reader> The reader, never null.
Exceptions
image_file_errorIf the file does not exist or can not be read.
unsupported_operation_errorIf no format can read the file.
image_file_format_errorIf the file is malformed or truncated.
std::invalid_argumentIf the acquisition has fewer time quanta than there are fractions, or if the renderer does not render its events into images of rank two.

Implements vitrio::image_reader_provider.


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