ImFusion Web SDK

TransferFunction

1D transfer function for classification during rendering.

A 1D transfer function describes a mapping from image intensities to the optical properties of color and opacity. In this implementation, the transfer function is either described by a set of tissues - each consisting of a set of key points - or a look-up-table (LUT).

Both image intensities and colors are defined in normalized [0..1] space. The windowing is defined in original pixel value domain (e.g. Hounsfield units).

Extends

Properties

PropertyModifierTypeDescription
modereadonlyTransferFunctionModeThe authoritative representation used by this transfer function.
windowpublicnumberWindowing width in the original value domain.
levelpublicnumberWindowing center in the original value domain.

Accessors

AccessorAccessTypeDescription
presetNameget/setstringThe preset this transfer function originated from.

Methods

MethodDescription
tissues()Returns a copy of all keypoint tissues.
lut()Returns a copy of the LUT, or undefined in keypoint mode.
setTissues()Replaces the keypoint mapping and switches to keypoint mode.
setLut()Replaces the LUT and switches to LUT mode.

Inherited from ClassHandle

MethodDescription
isAliasOf()Returns true if this handle and other alias the same underlying C++ object.
delete()Releases this JavaScript handle.
deleteLater()Schedules this handle for deferred deletion and returns this handle.
isDeleted()Returns true if this handle has already been deleted.
[dispose]()Releases this handle when the enclosing scope exits, so a handle can be declared with using instead of calling delete() later manually.
clone()Returns a new JavaScript handle aliasing the same underlying C++ object.

tissues()

ts
tissues(): TransferFunctionKeyPoint[][];

Returns a copy of all keypoint tissues.

Returns

TransferFunctionKeyPoint[][]


lut()

ts
lut():
  | Float32Array<ArrayBufferLike>
  | undefined;

Returns a copy of the LUT, or undefined in keypoint mode.

Returns

| Float32Array<ArrayBufferLike> | undefined


setTissues()

ts
setTissues(tissues: TransferFunctionKeyPoint[][]): void;

Replaces the keypoint mapping and switches to keypoint mode.

Parameters

ParameterTypeDescription
tissuesTransferFunctionKeyPoint[][]Complete replacement list of keypoint tissues.

Returns

void


setLut()

ts
setLut(data: Float32Array): void;

Replaces the LUT and switches to LUT mode.

Parameters

ParameterTypeDescription
dataFloat32ArrayNon-empty interleaved RGBA values.

Returns

void

On this page