Function sample_value

Source
fn sample_value(
    band_data: &ArrayView2<'_, i16>,
    rect: Rectangle,
    point: Index2d,
    method: SamplingMethod,
) -> i16
Expand description

Samples a value from a 2D array at the given point using the specified method.

Replaces the duplicated match method { SamplingMethod::* } pattern found in extract_blockwise() and extract().