|
vitrio 0.3.1
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
|
Reads an acquisition of detector events as a movie of the images its fractions render into. More...
#include <vitrio/detector_event_image_reader.hpp>


Public Member Functions | |
| detector_event_image_reader (std::shared_ptr< const detector_event_timeline_reader > events, detector_event_fractionation fractionation, std::shared_ptr< const detector_event_renderer > renderer) | |
| Construct a reader rendering the fractions of an acquisition. | |
| const detector_event_fractionation & | get_fractionation () const noexcept |
| Get the fractionation the acquisition is read with. | |
| const image_descriptor & | get_descriptor () const noexcept override |
| Get the shape and data type of what the file holds. | |
| void | read (array_ref destination, const image_transfer_plan ®ions) const override |
| Read a set of hyperrectangles of the file into one array, all before returning. | |
| Public Member Functions inherited from vitrio::synchronous_image_reader | |
| void | read_async (array destination, image_transfer_plan regions, std::shared_ptr< completion_notifier > done) const final |
| Start reading a set of hyperrectangles of the file into one array. | |
| Public Member Functions inherited from vitrio::image_reader | |
| image_reader (const image_reader &other)=delete | |
| image_reader (image_reader &&other)=delete | |
| image_reader & | operator= (const image_reader &other)=delete |
| image_reader & | operator= (image_reader &&other)=delete |
Reads an acquisition of detector events as a movie of the images its fractions render into.
The time of the acquisition is cut by a detector_event_fractionation, and each fraction is rendered into one image by a detector_event_renderer. A fractionation of several fractions is read as a stack of images, its first axis running along the fractions, and one of a single fraction as one image of every event.
A fraction is read and rendered as a whole when a region reaches it, and the fraction rendered last is kept, so regions of one fraction read by successive calls render it once. Rendering goes through one image, so concurrent calls to read are serialised.
Images of rank two are rendered, as a detector gives.
| vitrio::detector_event_image_reader::detector_event_image_reader | ( | std::shared_ptr< const detector_event_timeline_reader > | events, |
| detector_event_fractionation | fractionation, | ||
| std::shared_ptr< const detector_event_renderer > | renderer ) |
Construct a reader rendering the fractions of an acquisition.
| events | The acquisition. |
| fractionation | How its time is cut into fractions. |
| renderer | How a fraction is turned into an image. |
| std::invalid_argument | If events or renderer is null, if there are more fractions than time quanta to cut, or if renderer does not render the events of events into images of rank two. |
|
overridevirtualnoexcept |
Get the shape and data type of what the file holds.
The extents are those of the file in the order it stores its axes, slowest first. How it lays its elements out within them is the format's own business and is not reported. The data type is the one a read produces without converting, which is therefore the cheapest type to ask a destination for.
A file whose format can not tell a stack of one image or volume from a single one is described as the single one.
Implements vitrio::image_reader.
|
noexcept |
Get the fractionation the acquisition is read with.
|
overridevirtual |
Read a set of hyperrectangles of the file into one array, all before returning.
As image_reader::read_async describes, except that it is done when it returns and a failure is thrown. destination must outlive the call, and no longer.
| destination | Where the regions are written. Must be initialized. |
| regions | The regions to read and where each one lands. |
| std::invalid_argument,std::out_of_range,unsupported_operation_error,image_file_format_error,image_file_error | As image_reader::read_async reports them. |
| std::out_of_range | If an event lies outside the grid of the acquisition. |
Implements vitrio::synchronous_image_reader.