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

Extracts a box from the selected dimensions, and translates its origin to 0.

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

For example: Dims(0, 2).TranslateBoxSlice(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]

[0, 2], [2, 5], [0, 3]

Labels

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

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

Equivalent input indices

{1, 3, 2}

{0, 3, 0}

Equivalent input indices

{x + 1, y, z + 4}

{x, y, z}

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

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.