1.0.1 • Published 11 years ago
apply-colormap v1.0.1
apply-colormap
Applies a color map to an ndarray.
Example
var imshow = require("ndarray-imshow")
var colorize = require("apply-colormap")
var fill = require("ndarray-fill")
var zeros = require("zeros")
var x = zeros([512, 512])
fill(x, function(a,b) {
return a*a + b*b
})
imshow(colorize(x))Install
npm install apply-colormapAPI
require("apply-colormap")(array[, options])
Applies a colormap to an ndarray
arrayis an ndarrayoptionsis an object containing a list of properties to apply to the arraycolormapdetermines the colormap to use (default "jet"). Names are consistent with thecolormappackage.mindetermines the lowest color in the imagemaxdetermines the highest color in the imageoutBufferis an optional buffer into which the output is written
Returns An ndarray representing the colorized image or volume
Credits
(c) 2014 Mikola Lysenko. MIT License