5#include <vitrio/array/numerical_type.hpp>
6#include <vitrio/export.hpp>
7#include <vitrio/span.hpp>
42 std::size_t core_rank,
43 numerical_type data_type
64 std::size_t
hash() const noexcept;
92 friend
bool operator==(
98 lhs.m_core_rank == rhs.m_core_rank &&
99 lhs.m_data_type == rhs.m_data_type &&
100 lhs.m_extents == rhs.m_extents;
103 friend bool operator!=(
108 return !(lhs == rhs);
112 std::vector<std::size_t> m_extents;
113 std::size_t m_core_rank;
114 numerical_type m_data_type;
128span<const std::size_t>
129get_core_extents(
const image_descriptor &descriptor)
noexcept;
137struct hash<vitrio::image_descriptor>
139 std::size_t operator()(
143 return descriptor.hash();
The shape and data type of the values an image file holds.
Definition image_descriptor.hpp:28
span< const std::size_t > get_extents() const noexcept
Get the extents of the file.
numerical_type get_data_type() const noexcept
Get the data type of the elements.
std::size_t get_core_rank() const noexcept
Get how many of the extents are one image or volume.
image_descriptor(span< const std::size_t > extents, std::size_t core_rank, numerical_type data_type)
Construct a descriptor from its components.
std::size_t hash() const noexcept
Get the hash value for this descriptor.
A view of a contiguous sequence of elements.
Definition span.hpp:29