40 inline constexpr
float operator[](std::size_t idx)
const noexcept {
41 assert(idx < 3 &&
"Index out of bounds");
64 inline std::size_t &
operator[](std::size_t idx) noexcept {
65 assert(idx < 3 &&
"Index out of bounds");
79 inline constexpr std::size_t
linear() const noexcept {
80 return width * height *
depth;
86 inline constexpr
bool operator==(
VolumeSize const &rhs)
const {
90 inline constexpr
bool operator!=(
VolumeSize const &rhs)
const {
91 return !(*
this == rhs);
Name namespace for CortidQCT library.
Definition: CortidQCT.h:23
std::size_t height
Size along the y-axis.
Definition: VolumeSize.h:26
std::size_t width
Size along the x-axis.
Definition: VolumeSize.h:24
constexpr std::size_t linear() const noexcept
Returns the linear size (i.e. width * height * depth)
Definition: VolumeSize.h:79
Size type for a 3D voxel.
Definition: VolumeSize.h:22
std::size_t & operator[](std::size_t idx) noexcept
subscript operator for dimension access
Definition: VolumeSize.h:64
std::size_t depth
Size along the z-axis.
Definition: VolumeSize.h:28
constexpr float operator[](std::size_t idx) const noexcept
subscript operator for dimension access
Definition: VolumeSize.h:40