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

Groups a list of image locations by file. More...

#include <vitrio/image_location_grouping.hpp>

Classes

class  group
 The locations of one file in an image_location_grouping. More...
 

Public Member Functions

 image_location_grouping (span< const image_location > locations)
 Group a list of locations by file.
 
 image_location_grouping (const image_location_grouping &other)
 
 image_location_grouping (image_location_grouping &&other) noexcept
 
image_location_grouping & operator= (const image_location_grouping &other)
 
image_location_grouping & operator= (image_location_grouping &&other) noexcept
 
std::size_t get_group_count () const noexcept
 Get the number of groups.
 
group get_group (std::size_t index) const
 Get the group of a file.
 

Detailed Description

Groups a list of image locations by file.

Each file has one group, and the groups are in ascending order of key. The grouping therefore does not depend on the order of the locations.

A file is either addressed as a whole, or has the stack indices of its locations. A file that any location addresses as a whole has no indices, because the whole file includes them.

Two locations belong to the same file if their keys are equal strings.

Constructor & Destructor Documentation

◆ image_location_grouping()

vitrio::image_location_grouping::image_location_grouping ( span< const image_location >  locations)
explicit

Group a list of locations by file.

Parameters
locationsThe locations to group.

Member Function Documentation

◆ get_group()

group vitrio::image_location_grouping::get_group ( std::size_t  index) const

Get the group of a file.

Parameters
indexIndex of the group.
Returns
group The group. It refers to storage owned by this grouping.
Exceptions
std::out_of_rangeIf index is not below get_group_count.

◆ get_group_count()

std::size_t vitrio::image_location_grouping::get_group_count ( ) const
noexcept

Get the number of groups.

Returns
std::size_t The number of groups, which is the number of files.

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