ImFusion Web SDK

Display

Class representing the main render area.

Extends

Methods

MethodDescription
setSize()Sets the size of the render area in pixels.
render()Perform rendering of the Display and all its Views.
layouter()Returns the DisplayAutoLayouter used to perform automatic layouting of the views.
main2dView()Returns the SliceView for showing 2D data.
mainAxialView()Returns the axial SliceView for showing 3D data.
mainCoronalView()Returns the coronal SliceView for showing 3D data.
mainSagittalView()Returns the sagittal SliceView for showing 3D data.
main3dView()Returns the VolumeView for showing 3D data.
viewGroup()Returns the view group that contains all views.
mainViewOverlays()Returns the RadiologyViewOverlays instance enabling you to easily create and maintain common ViewOverlays.
handleMouseDown()Handle a mousedown event.
handleMouseUp()Handle a mouseup event.
handleDoubleClick()Handle a dblclick event.
handleMouseMove()Handle a mousemove event.
handleMouseWheel()Handle a wheel event.
handleTouchPointerDown()Handle a pointerdown event of pointerType touch
handleTouchPointerMove()Handle a pointermove event of pointerType touch
handleTouchPointerUp()Handle a pointerup event of pointerType touch
handleTouchPointerCancel()Handle a pointercancel event of pointerType touch
handleLongPress()Handle a long press event
handleTouchStart()
handleTouchMove()
handleTouchEnd()
handleContextMenu()Handle a contextmenu event.
onUpdateRequested()Fires when a render is requested.
setBackgroundColor()Set the optional background color of the rendering area.

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.

setSize()

ts
setSize(width: number, height: number): void;

Sets the size of the render area in pixels.

Parameters

ParameterType
widthnumber
heightnumber

Returns

void


render()

ts
render(): void;

Perform rendering of the Display and all its Views.

Returns

void


layouter()

ts
layouter(): DisplayAutoLayouter;

Returns the DisplayAutoLayouter used to perform automatic layouting of the views.

Returns

DisplayAutoLayouter


main2dView()

ts
main2dView(): SliceView;

Returns the SliceView for showing 2D data.

Returns

SliceView


mainAxialView()

ts
mainAxialView(): SliceView;

Returns the axial SliceView for showing 3D data.

Returns

SliceView


mainCoronalView()

ts
mainCoronalView(): SliceView;

Returns the coronal SliceView for showing 3D data.

Returns

SliceView


mainSagittalView()

ts
mainSagittalView(): SliceView;

Returns the sagittal SliceView for showing 3D data.

Returns

SliceView


main3dView()

ts
main3dView(): VolumeView;

Returns the VolumeView for showing 3D data.

Returns

VolumeView


viewGroup()

ts
viewGroup(): RadiologyViewGroup;

Returns the view group that contains all views.

Returns

RadiologyViewGroup


mainViewOverlays()

ts
mainViewOverlays(): RadiologyViewOverlays;

Returns the RadiologyViewOverlays instance enabling you to easily create and maintain common ViewOverlays.

Returns

RadiologyViewOverlays


handleMouseDown()

ts
handleMouseDown(event: MouseEvent): EventResult;

Handle a mousedown event.

Parameters

Returns

EventResult


handleMouseUp()

ts
handleMouseUp(event: MouseEvent): EventResult;

Handle a mouseup event.

Parameters

Returns

EventResult


handleDoubleClick()

ts
handleDoubleClick(event: MouseEvent): EventResult;

Handle a dblclick event.

Parameters

Returns

EventResult


handleMouseMove()

ts
handleMouseMove(event: MouseEvent): EventResult;

Handle a mousemove event.

Parameters

Returns

EventResult


handleMouseWheel()

ts
handleMouseWheel(event: WheelEvent): EventResult;

Handle a wheel event.

Parameters

Returns

EventResult


handleTouchPointerDown()

ts
handleTouchPointerDown(event: PointerEvent): EventResult;

Handle a pointerdown event of pointerType touch

Parameters

Returns

EventResult


handleTouchPointerMove()

ts
handleTouchPointerMove(event: PointerEvent): EventResult;

Handle a pointermove event of pointerType touch

Parameters

Returns

EventResult


handleTouchPointerUp()

ts
handleTouchPointerUp(event: PointerEvent): EventResult;

Handle a pointerup event of pointerType touch

Parameters

Returns

EventResult


handleTouchPointerCancel()

ts
handleTouchPointerCancel(event: PointerEvent): EventResult;

Handle a pointercancel event of pointerType touch

Parameters

Returns

EventResult


handleLongPress()

ts
handleLongPress(event: PointerEvent): EventResult;

Handle a long press event

Parameters

Returns

EventResult


handleTouchStart()

ts
handleTouchStart(event: TouchEvent): EventResult;

Parameters

Returns

EventResult

Deprecated

  • Use handlePointerTouchEvent instead Handle a touchstart event.

handleTouchMove()

ts
handleTouchMove(event: TouchEvent): EventResult;

Parameters

Returns

EventResult

Deprecated

  • Use handlePointerTouchEvent instead Handle a touchmove event.

handleTouchEnd()

ts
handleTouchEnd(event: TouchEvent): EventResult;

Parameters

Returns

EventResult

Deprecated

  • Use handlePointerTouchEvent instead Handle a touchend event.

handleContextMenu()

ts
handleContextMenu(event: PointerEvent): EventResult;

Handle a contextmenu event.

Parameters

Returns

EventResult


onUpdateRequested()

ts
onUpdateRequested(callback: () => void): () => void;

Fires when a render is requested.

Parameters

ParameterType
callback() => void

Returns

Unsubscribe function.

() => void


setBackgroundColor()

ts
setBackgroundColor(color?: vec3): void;

Set the optional background color of the rendering area.

Parameters

ParameterTypeDescription
color?vec3The new background color. Omitting the parameter causes the display to not clear the color buffer of the rendering area. Note that individual views might still clear their own viewport.

Returns

void

On this page