Skip to main content

Class: ColorTables

Defined in: colortables.ts:29

Constructors​

Constructor​

new ColorTables(): ColorTables;

Defined in: colortables.ts:37

Sets cluts to alphabetically sorted cmaps

Returns​

ColorTables

Properties​

PropertyTypeDefault valueDefined in
clutsRecord<string, ColorMap>{}colortables.ts:32
gammanumber1.0colortables.ts:30
versionnumber0.1colortables.ts:31

Methods​

addColormap()​

addColormap(key: string, cmap: ColorMap): void;

Defined in: colortables.ts:49

Parameters​

ParameterType
keystring
cmapColorMap

Returns​

void


colormap()​

colormap(key: string, isInvert: boolean): Uint8ClampedArray;

Defined in: colortables.ts:89

Parameters​

ParameterTypeDefault value
keystring''
isInvertbooleanfalse

Returns​

Uint8ClampedArray


colormapFromKey()​

colormapFromKey(name: string): ColorMap;

Defined in: colortables.ts:63

Parameters​

ParameterType
namestring

Returns​

ColorMap


colormaps()​

colormaps(): string[];

Defined in: colortables.ts:53

Returns​

string[]


colorMaps()​

colorMaps(): string[];

Defined in: colortables.ts:58

Returns​

string[]


makeDrawLut()​

makeDrawLut(name: string | ColorMap): LUT;

Defined in: colortables.ts:170

Parameters​

ParameterType
namestring | ColorMap

Returns​

LUT


makeLabelLut()​

makeLabelLut(
cm: ColorMap,
alphaFill: number,
maxIdx: number): LUT;

Defined in: colortables.ts:94

Parameters​

ParameterTypeDefault value
cmColorMapundefined
alphaFillnumber255
maxIdxnumberInfinity

Returns​

LUT


makeLabelLutFromUrl()​

makeLabelLutFromUrl(
name: string,
alphaFill: number,
maxIdx: number): Promise<LUT>;

Defined in: colortables.ts:162

Parameters​

ParameterTypeDefault value
namestringundefined
alphaFillnumber255
maxIdxnumberInfinity

Returns​

Promise<LUT>


makeLut()​

makeLut(
Rsi: number[],
Gsi: number[],
Bsi: number[],
Asi: number[],
Isi: number[],
isInvert: boolean): Uint8ClampedArray;

Defined in: colortables.ts:216

Parameters​

ParameterType
Rsinumber[]
Gsinumber[]
Bsinumber[]
Asinumber[]
Isinumber[]
isInvertboolean

Returns​

Uint8ClampedArray