dt

Crates.iodt
lib.rsdt
version1.0.6
sourcesrc
created_at2020-07-17 04:19:54.996503
updated_at2020-07-17 21:57:48.733092
descriptiondistance transform
homepage
repositoryhttps://github.com/clearlycloudy/dt/
max_upload_size
id266120
size12,163
Yuan Liu (exbibyte)

documentation

https://docs.rs/dt/

README

dt

Computing euclidean distance transform with ndarray. Currently accepts ndarray of IxDyn dimension type and computes distance transform over the entire volume.

Sample Usage:

    use dt::{dt, dt_bool, dt_int, ndarray::prelude::*};

    ...

    let a = arr2(&[
        [1., 0., 1., 1.],
        [1., 0., 1., 0.],
        [0., 0., 0., 0.],
        [0., 0., 0., 1.],
    ])
    .into_dyn();
    let out0 : Array<f64, IxDyn> = dt(&a);

    let a = arr2(&[
        [true, false, true, true],
        [true, false, true, false],
        [false, false, false, false],
        [false, false, false, true],
    ])
    .into_dyn();
    let out1 : Array<f32, IxDyn> = dt_bool(&a);

    let a = arr2(&[
        [1, 0, 1, 1],
        [1, 0, 1, 0],
        [0, 0, 0, 0],
        [0, 0, 0, 1],
    ])
    .into_dyn();
    let out2 : Array<f32, IxDyn> = dt_int(&a);
Commit count: 11

cargo fmt