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

How many pixels of a detector an image gathers into one, along each axis. More...

#include <vitrio/detector_event_binning.hpp>

Public Member Functions

 detector_event_binning (std::size_t factor)
 Construct a binning by a factor.
 
 detector_event_binning (const detector_event_binning &other) noexcept
 
detector_event_binning & operator= (const detector_event_binning &other) noexcept
 
std::size_t get_factor () const noexcept
 Get how many pixels of the detector are merged into one.
 
std::vector< std::size_t > resolve (const detector_event_timeline_descriptor &events) const
 Get how many position quanta a pixel of an image gathers.
 

Friends

bool operator== (const detector_event_binning &lhs, const detector_event_binning &rhs) noexcept
 
bool operator!= (const detector_event_binning &lhs, const detector_event_binning &rhs) noexcept
 

Detailed Description

How many pixels of a detector an image gathers into one, along each axis.

A factor of 1 renders at the resolution of the detector, 2 merges blocks of 2 by 2 pixels, and so on. It is stated in pixels of the detector rather than in the quanta its events are placed with, so the same binning applies to any acquisition, whatever subdivisions of a pixel it records.

The factor must divide the pixels along every axis of an acquisition it is applied to, so that every pixel of an image gathers as many of the detector as any other.

See also
counting_detector_event_renderer

Constructor & Destructor Documentation

◆ detector_event_binning()

vitrio::detector_event_binning::detector_event_binning ( std::size_t  factor)
explicit

Construct a binning by a factor.

Parameters
factorPixels of the detector merged into one along each axis.
Exceptions
std::invalid_argumentIf factor is zero.

Member Function Documentation

◆ get_factor()

std::size_t vitrio::detector_event_binning::get_factor ( ) const
noexcept

Get how many pixels of the detector are merged into one.

Returns
std::size_t The factor along each axis. Never zero.

◆ resolve()

std::vector< std::size_t > vitrio::detector_event_binning::resolve ( const detector_event_timeline_descriptor &  events) const

Get how many position quanta a pixel of an image gathers.

Parameters
eventsThe grid the events of an acquisition are placed on.
Returns
std::vector<std::size_t> The extents of the block of quanta a pixel gathers, slowest axis first: the subdivisions of a pixel of the detector times the factor.
Exceptions
std::invalid_argumentIf the factor does not divide the pixels of the detector along an axis of events.

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