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_reader Class Referenceabstract

Abstract read-only view of one acquisition of a detector that counts events. More...

#include <vitrio/detector_event_timeline_reader.hpp>

Public Member Functions

 detector_event_timeline_reader (const detector_event_timeline_reader &other)=delete
 
 detector_event_timeline_reader (detector_event_timeline_reader &&other)=delete
 
detector_event_timeline_reader & operator= (const detector_event_timeline_reader &other)=delete
 
detector_event_timeline_reader & operator= (detector_event_timeline_reader &&other)=delete
 
virtual const detector_event_timeline_descriptor & get_descriptor () const noexcept=0
 Get the grid the events are placed on and the time they span.
 
virtual void read (std::uint64_t time_begin, std::uint64_t time_end, detector_event_timeline &destination) const =0
 Read the events of a stretch of time.
 

Detailed Description

Abstract read-only view of one acquisition of a detector that counts events.

A reader exposes the events of an acquisition a stretch of time at a time, so that what is read of a long acquisition is only what is asked for, rather than every event it holds. How the events are stored, and whether a stretch of time is decoded to be read, is the business of the reader.

Everything a reader reports is fixed when it is opened, and reading does not change it.

See also
detector_event_timeline_descriptor

Member Function Documentation

◆ get_descriptor()

virtual const detector_event_timeline_descriptor & vitrio::detector_event_timeline_reader::get_descriptor ( ) const
pure virtualnoexcept

Get the grid the events are placed on and the time they span.

Returns
const detector_event_timeline_descriptor& The descriptor. It refers to storage owned by this reader.

◆ read()

virtual void vitrio::detector_event_timeline_reader::read ( std::uint64_t  time_begin,
std::uint64_t  time_end,
detector_event_timeline &  destination 
) const
pure virtual

Read the events of a stretch of time.

destination is cleared and given the events whose timestamps lie in [time_begin,time_end), in groups of ascending timestamps as detector_event_timeline holds them. Every coordinate lies within the extents of get_descriptor.

Thread safety
This method may be called concurrently on one reader. A reader that can not decode in parallel serialises the calls itself.
Parameters
time_beginThe first time quantum to read.
time_endOne past the last time quantum to read. A stretch of no time reads nothing and succeeds.
destinationWhere the events are written. Must have the rank of get_descriptor.
Exceptions
std::invalid_argumentIf time_begin is after time_end, or if destination does not have the rank of the events.
std::out_of_rangeIf time_end is past the time extent of get_descriptor.
image_file_format_errorIf the acquisition turns out to be malformed or truncated where it is read.

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