Crates.io | dt |
lib.rs | dt |
version | 1.0.6 |
source | src |
created_at | 2020-07-17 04:19:54.996503 |
updated_at | 2020-07-17 21:57:48.733092 |
description | distance transform |
homepage | |
repository | https://github.com/clearlycloudy/dt/ |
max_upload_size | |
id | 266120 |
size | 12,163 |
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);