Skip to content

xgui3783/ng-layer-tune

Repository files navigation

ng-layer-tune

A control wrapper for neuroglancer image layer.

inframe example

iframe example

global exports

under globalThis.ngLayerTune

A number of utility functions and supported colormaps are exposed under globalThis.ngLayerTune once the library is imported. For example:

globalThis.ngLayerTune.colorMapNames.length // 14
globalThis.ngLayerTune.colorMapNames[0] // 'jet'

globalThis.ngLayerTune.parseColorMapFromStr("jet") === "jet"
globalThis.ngLayerTune.parseColorMapFromStr("JET") === "jet"
globalThis.ngLayerTune.parseColorMapFromStr("rgba (4 channel)") === "rgba (4 channel)"
globalThis.ngLayerTune.parseColorMapFromStr("RGBA") === "rgba (4 channel)"

const cmstr = globalThis.ngLayerTune.encodeShader({ colormap: "jet" })
const cmCfg = globalThis.ngLayerTune.encodeShader.decodeShader(cmstr)

const greyscaleCmStr = globalThis.ngLayerTune.encodeShader({ colormap: "jett" }) // typo, default to greyscale
const greyscaleCmStr2 = globalThis.ngLayerTune.encodeShader({ colormap: "rgba" }) // not correct colormap (missing `4 channel`), default to greyscale
const greyscaleCmStr2 = globalThis.ngLayerTune.encodeShader({ colormap: "JET" }) // not correct colormap (should be `jet`), default to greyscale

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •