|
vitrio 0.1.4
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
|
The shape every region of a transfer shares: the extents of one region and the ranks of the file and the array it joins. More...
#include <vitrio/image_transfer_shape.hpp>
Public Member Functions | |
| image_transfer_shape (std::vector< std::size_t > extents, std::size_t file_rank, std::size_t array_rank) | |
| Construct a shape from its components. | |
| image_transfer_shape (const image_transfer_shape &other) | |
| image_transfer_shape (image_transfer_shape &&other) noexcept | |
| image_transfer_shape & | operator= (const image_transfer_shape &other) |
| image_transfer_shape & | operator= (image_transfer_shape &&other) noexcept |
| span< const std::size_t > | get_extents () const noexcept |
| Get the extents of one region. | |
| std::size_t | get_rank () const noexcept |
| Get the rank of one region. | |
| std::size_t | get_file_rank () const noexcept |
| Get the rank of the file side. | |
| std::size_t | get_array_rank () const noexcept |
| Get the rank of the array side. | |
| std::size_t | get_leading_rank (std::size_t rank) const noexcept |
| Get how many leading axes of a side a region spans a single position along. | |
| std::size_t | get_extent (std::size_t rank, std::size_t axis) const noexcept |
| Get the extent a region spans along one axis of a side. | |
The shape every region of a transfer shares: the extents of one region and the ranks of the file and the array it joins.
The extents are the shape of one region and nothing else, so they carry the rank of the region rather than the rank of either side. A side of higher rank spans a single position along the axes the extents do not reach, which are its implicit leading ones, and neither side pads the extents. For example, two dimensional regions of a two dimensional file placed side by side along the first axis of a three dimensional array have extents of rank two, a file rank of two and an array rank of three. Ranks may differ in either direction, so a plane of a three dimensional file may equally go to a two dimensional array.
| vitrio::image_transfer_shape::image_transfer_shape | ( | std::vector< std::size_t > | extents, |
| std::size_t | file_rank, | ||
| std::size_t | array_rank | ||
| ) |
Construct a shape from its components.
| extents | Extents of one region. Their rank is the rank of the region, which may be lower than that of either side. |
| file_rank | Rank of the file side. |
| array_rank | Rank of the array side. |
| std::invalid_argument | If the rank of extents exceeds file_rank or array_rank. |
|
noexcept |
Get the rank of the array side.
|
noexcept |
Get the extent a region spans along one axis of a side.
| rank | Rank of the side. Must not be below get_rank. |
| axis | Index of the axis, below rank. |
Get the extents of one region.
|
noexcept |
Get the rank of the file side.
|
noexcept |
Get how many leading axes of a side a region spans a single position along.
| rank | Rank of the side. Must not be below get_rank. |
|
noexcept |
Get the rank of one region.