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
| Property | Modifier | Type | Description |
|---|---|---|---|
mode | readonly | TransferFunctionMode | The authoritative representation used by this transfer function. |
window | public | number | Windowing width in the original value domain. |
level | public | number | Windowing center in the original value domain. |
Accessors
| Accessor | Access | Type | Description |
|---|---|---|---|
presetName | get/set | string | The preset this transfer function originated from. |
Methods
| Method | Description |
|---|---|
| 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
| Method | Description |
|---|---|
| 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
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
| Parameter | Type | Description |
|---|---|---|
tissues | TransferFunctionKeyPoint[][] | Complete replacement list of keypoint tissues. |
Returns
void
setLut()
ts
setLut(data: Float32Array): void;Replaces the LUT and switches to LUT mode.
Parameters
| Parameter | Type | Description |
|---|---|---|
data | Float32Array | Non-empty interleaved RGBA values. |
Returns
void