#include "tensorstore/downsample.h"
Result<Spec>
tensorstore::Downsample(const Specbase_spec,
                        
span<const Index> downsample_factors,
                        
DownsampleMethod downsample_method);

Returns a downsampled view of a Spec.

Parameters:
const Spec &base_spec

Base spec to downsample.

span<const Index> downsample_factors

Factors by which to downsample each dimension. Must have length compatible with base_spec.rank() and all factors must be positive. May be specified as a braced list, e.g. Downsample(base_spec, {2, 3}, DownsampleMethod::kMean).

DownsampleMethod downsample_method

The downsampling method.

Returns:

The downsampled view.