#include "tensorstore/index_space/dim_expression.h"
template <typename BoxType>
auto tensorstore::DimExpression<Op...>::BoxSlice(
    
const BoxTypebox) const;

Extracts a box from the selected dimensions.

This is equivalent to SizedInterval(box.origin(), box.shape()).

For example: Dims(0, 2).BoxSlice(BoxView({1, 4}, {3, 4})) has the following effects:

Before

After

Dimension selection

{0, 2}

{0, 2}

Input domain

[0, 6], [2, 5], [0, 9]

[1, 3], [2, 5], [4, 7]

Labels

{"x", "y", "z"}

{"x", "y", "z"}

Equivalent input indices

{1, 3, 4}

{1, 3, 4}

Equivalent input indices

{x, y, z}

{x, y, z}

where x is any index in [1, 3], y is any index in [2, 5], and z is any index in [4, 7].

Requires:

BoxType satisfies IsBoxLike and has a rank compatible with the static rank of the dimension selection.

Parameters:
const BoxType &box

The box to extract.