1.0.2 • Published 12 years ago
rle-ndarray v1.0.2
rle-ndarray
Conversion between rle volumes and ndarrays
Install
npm install rle-ndarrayAPI
var convert = require("rle-ndarray")convert.rle2array(volume[, bounds])
Converts an rle data structure into an ndarray
volumeis the volume we are converting- `bounds is a bound on the region to convert (optional)
Returns An object containing a pair of ndarrays:
phaseis the phase field of the volumedistanceis the distance field of the volume
convert.array2rle(phase[, distance, offset])
Converts an ndarray into an rle data structure
phasean array of phasesdistanceapproximate signed distance to boundary (default constant 1.0)offseta translational offset which is applied to the array (default 0,0,0)
Returns An ndarray encoding the array
Credits
(c) 2013 Mikola Lysenko. MIT License