|
vitrio 0.1.4
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
|
Address of an image file, or of one image or volume of a stack. More...
#include <vitrio/image_location.hpp>
Public Member Functions | |
| image_location (std::string key, std::size_t index_in_stack=no_stack_index) | |
| Construct a location from its components. | |
| image_location () noexcept | |
| Construct a location with an empty key and no index. | |
| image_location (const image_location &other) | |
| image_location (image_location &&other) noexcept | |
| image_location & | operator= (const image_location &other) |
| image_location & | operator= (image_location &&other) noexcept |
| std::size_t | hash () const noexcept |
| Get the hash value for this location. | |
| const std::string & | get_key () const noexcept |
| Get the key of the file. | |
| std::size_t | get_index_in_stack () const noexcept |
| Get the index of the image or volume within the stack. | |
| bool | has_index_in_stack () const noexcept |
| Check whether this addresses one image or volume of its file rather than the file as a whole. | |
Static Public Attributes | |
| static constexpr std::size_t | no_stack_index |
| Index addressing the file as a whole rather than one image or volume of it. | |
Friends | |
| bool | operator== (const image_location &lhs, const image_location &rhs) noexcept |
| bool | operator!= (const image_location &lhs, const image_location &rhs) noexcept |
| bool | operator< (const image_location &lhs, const image_location &rhs) noexcept |
| bool | operator<= (const image_location &lhs, const image_location &rhs) noexcept |
| bool | operator> (const image_location &lhs, const image_location &rhs) noexcept |
| bool | operator>= (const image_location &lhs, const image_location &rhs) noexcept |
| std::ostream & | operator<< (std::ostream &os, const image_location &location) |
Address of an image file, or of one image or volume of a stack.
The pair of the key of a file and a zero based index along the axis the file stacks along, its slowest. The index no_stack_index addresses the file as a whole instead, which is how a file holding a single image or volume is named.
The key is what a provider is asked for the file with. It is often the path of the file, and it is held as a plain string.
|
explicit |
Construct a location from its components.
| key | Key of the file, such as its path. |
| index_in_stack | Zero based index of the image or volume along the slowest axis of the file, or no_stack_index to address the whole file. |
|
noexcept |
Get the index of the image or volume within the stack.
|
noexcept |
Get the key of the file.
|
noexcept |
Check whether this addresses one image or volume of its file rather than the file as a whole.
|
noexcept |
Get the hash value for this location.
|
staticconstexpr |
Index addressing the file as a whole rather than one image or volume of it.