Skip to main content

Function: imageSliceSyncCallback()

imageSliceSyncCallback(synchronizerInstance, sourceViewport, targetViewport): Promise<void>

Synchronizer callback to synchronize the source viewport image to the target viewports closest image in its stack.

This synchronizer does a setup (which can already be predefined as required) to register the target and source viewports. The registration will default to the identity registration if the same FOR is present in both viewports, unless the option useInitialPosition is set in the target viewport.

The consuming apps using Cornerstone3D (OHIF, etc) MAY provide such data in the registrationMetadataProvider to override the data here. This can be done by various methods 1) Using spatialRegistrationModule inside dicom 2) assuming the user has actually manually scrolled the target viewport to the correct slice before initiating the synchronization 3) using some other method

Parameters

synchronizerInstance: Synchronizer

The Instance of the Synchronizer

sourceViewport: IViewportId

The list of IDs defining the source viewport.

targetViewport: IViewportId

The list of IDs defining the target viewport, never the same as sourceViewport.

Returns

Promise<void>

Defined in

tools/src/synchronizers/callbacks/imageSliceSyncCallback.ts:40