-
#include "tensorstore/index_space/dimension_units.h" -
Result<DimensionUnitsVector>
tensorstore::TransformInputDimensionUnits(
IndexTransformView<> transform,
DimensionUnitsVector input_units); Converts dimension units for the input space to dimension units for the output space.
Output dimensions with
OutputIndexMethod::single_input_dimensionmaps are assigned the unit of the corresponding input dimension, if any, divided by the absolute value of the stride.The units of output dimensions with
OutputIndexMethod::constantandOutputIndexMethod::arraymaps are left unspecified.If a unit is specified for an input dimension, but no output dimension depends on it via a
OutputIndexMethod::single_input_dimensionmap, an error is returned to indicate that this unit would be “lost”.- Parameters:¶
- IndexTransformView<> transform¶
Index transform.
- DimensionUnitsVector input_units¶
Units for each input dimension of
transform.
- Error absl::StatusCode::kInvalidArgument:¶
if a unit is specified for an input dimension that does not correspond to an output dimension.