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

Abstract way of turning the events of a detector into an image. More...

#include <vitrio/detector_event_renderer.hpp>

Inheritance diagram for vitrio::detector_event_renderer:
Inheritance graph
[legend]

Public Member Functions

 detector_event_renderer (const detector_event_renderer &other)=delete
 
 detector_event_renderer (detector_event_renderer &&other)=delete
 
detector_event_renderer & operator= (const detector_event_renderer &other)=delete
 
detector_event_renderer & operator= (detector_event_renderer &&other)=delete
 
virtual std::vector< std::size_t > get_image_extents (const detector_event_timeline_descriptor &events) const =0
 Get the extents of the images rendered from an acquisition.
 
virtual numerical_type get_data_type () const noexcept=0
 Get the data type images are worked out in.
 
virtual void render (const detector_event_timeline_descriptor &descriptor, const detector_event_timeline &events, array_ref destination) const =0
 Render events into an image.
 

Detailed Description

Abstract way of turning the events of a detector into an image.

A renderer is given events and fills an image with them, whatever the time they span: which events make an image is decided by whoever hands them over. What an image is made of, be it a count of the events per pixel or anything worked out of them, is the business of the renderer, as are its extents and the data type it is worked out in.

Thread safety
Every method may be called concurrently.
See also
detector_event_timeline

Member Function Documentation

◆ get_data_type()

virtual numerical_type vitrio::detector_event_renderer::get_data_type ( ) const
pure virtualnoexcept

Get the data type images are worked out in.

Rendering into an image of that type converts nothing, which makes it the cheapest to ask for.

Returns
numerical_type The data type. Never unknown.

Implemented in vitrio::counting_detector_event_renderer.

◆ get_image_extents()

virtual std::vector< std::size_t > vitrio::detector_event_renderer::get_image_extents ( const detector_event_timeline_descriptor &  events) const
pure virtual

Get the extents of the images rendered from an acquisition.

Parameters
eventsThe grid the events are placed on.
Returns
std::vector<std::size_t> The extents of an image, slowest axis first.
Exceptions
std::invalid_argumentIf this renderer can not render events placed on the grid of events.

Implemented in vitrio::counting_detector_event_renderer.

◆ render()

virtual void vitrio::detector_event_renderer::render ( const detector_event_timeline_descriptor &  descriptor,
const detector_event_timeline &  events,
array_ref  destination 
) const
pure virtual

Render events into an image.

Every element of destination is written, whatever it held before. Values are converted to its data type as a cast between the two types does.

Parameters
descriptorThe grid the events are placed on and the time they span.
eventsThe events to render. Must have the rank of descriptor, and every coordinate must lie within its extents.
destinationWhere the image is written. Must be initialized and have the extents get_image_extents gives for descriptor. It may be strided.
Exceptions
std::invalid_argumentIf this renderer can not render events placed on the grid of descriptor, if events does not have its rank, or if destination is not initialized or does not have the extents of an image.
std::out_of_rangeIf an event lies outside the grid of descriptor.
unsupported_operation_errorIf the data type of destination can not be produced from that of get_data_type.

Implemented in vitrio::counting_detector_event_renderer.


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