vitrio 0.1.4
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
Loading...
Searching...
No Matches
image_transfer_plan.hpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2
3#pragma once
4
5#include <vitrio/export.hpp>
6#include <vitrio/image_transfer_shape.hpp>
7#include <vitrio/index_table.hpp>
8#include <vitrio/span.hpp>
9
10#include <cstddef>
11
12namespace vitrio
13{
14
134
135} // namespace vitrio
The regions to transfer between one file and one array.
Definition image_transfer_plan.hpp:34
void add(span< const std::size_t > file_offset, span< const std::size_t > array_offset)
Append one region.
span< const std::size_t > get_file_offset(std::size_t region_index) const noexcept
Get where a region starts in the file.
image_transfer_plan(image_transfer_shape shape)
Construct an empty plan of a given shape.
span< const std::size_t > get_array_offset(std::size_t region_index) const noexcept
Get where a region starts in the array.
void reserve(std::size_t count)
Make room for a number of regions without allocating later.
void clear() noexcept
Drop the regions held, keeping the shape and the capacity.
std::size_t get_region_count() const noexcept
Get how many regions are held.
const image_transfer_shape & get_shape() const noexcept
Get the shape every region shares.
The shape every region of a transfer shares: the extents of one region and the ranks of the file and ...
Definition image_transfer_shape.hpp:32
A sequence of indices of one and the same rank.
Definition index_table.hpp:29
A view of a contiguous sequence of elements.
Definition span.hpp:29