Skip to content

Class: ViewerControlTarget ​

Defined in: controls/ViewerControlTarget.ts:377

Runtime adapter from NeuroSurfaceViewer to the stable, UI-neutral control protocol. The concrete viewer is retained privately and never appears in a snapshot, command result, or subscription payload.

Implements ​

Constructors ​

Constructor ​

ts
new ViewerControlTarget(viewer, options?): ViewerControlTarget;

Defined in: controls/ViewerControlTarget.ts:395

Parameters ​

viewer ​

NeuroSurfaceViewer

options? ​

ViewerControlTargetOptions = {}

Returns ​

ViewerControlTarget

Methods ​

getSnapshot() ​

ts
getSnapshot(): SurfViewControlSnapshot;

Defined in: controls/ViewerControlTarget.ts:420

Returns ​

SurfViewControlSnapshot

Implementation of ​

SurfViewControlTarget.getSnapshot


getLayerDataSummary() ​

ts
getLayerDataSummary(address): ControlQueryResult<LayerDataSummaryControlDescriptor>;

Defined in: controls/ViewerControlTarget.ts:424

Lazily obtain the configured histogram summary for one scalar layer.

Parameters ​

address ​

LayerControlAddress

Returns ​

ControlQueryResult<LayerDataSummaryControlDescriptor>

Implementation of ​

SurfViewControlTarget.getLayerDataSummary


subscribe() ​

ts
subscribe(listener): SurfViewControlSubscription;

Defined in: controls/ViewerControlTarget.ts:466

Parameters ​

listener ​

SurfViewControlSnapshotListener

Returns ​

SurfViewControlSubscription

Implementation of ​

SurfViewControlTarget.subscribe


isDisposed() ​

ts
isDisposed(): boolean;

Defined in: controls/ViewerControlTarget.ts:482

Returns ​

boolean

Implementation of ​

SurfViewControlTarget.isDisposed


dispose() ​

ts
dispose(): void;

Defined in: controls/ViewerControlTarget.ts:487

Returns ​

void

Implementation of ​

SurfViewControlTarget.dispose


setAnatomicalView() ​

ts
setAnatomicalView(request): ControlCommandResult;

Defined in: controls/ViewerControlTarget.ts:495

Parameters ​

request ​

SetAnatomicalViewRequest

Returns ​

ControlCommandResult

Implementation of ​

SurfViewControlTarget.setAnatomicalView


fitView() ​

ts
fitView(): ControlCommandResult;

Defined in: controls/ViewerControlTarget.ts:534

Returns ​

ControlCommandResult

Implementation of ​

SurfViewControlTarget.fitView


resetView() ​

ts
resetView(): ControlCommandResult;

Defined in: controls/ViewerControlTarget.ts:551

Returns ​

ControlCommandResult

Implementation of ​

SurfViewControlTarget.resetView


setSurfaceVisibility() ​

ts
setSurfaceVisibility(surfaceId, visible): ControlCommandResult;

Defined in: controls/ViewerControlTarget.ts:558

Parameters ​

surfaceId ​

string

visible ​

boolean

Returns ​

ControlCommandResult

Implementation of ​

SurfViewControlTarget.setSurfaceVisibility


setLayerVisibility() ​

ts
setLayerVisibility(address, visible): ControlCommandResult;

Defined in: controls/ViewerControlTarget.ts:570

Parameters ​

address ​

LayerControlAddress

visible ​

boolean

Returns ​

ControlCommandResult

Implementation of ​

SurfViewControlTarget.setLayerVisibility


setLayerOpacity() ​

ts
setLayerOpacity(address, opacity): ControlCommandResult;

Defined in: controls/ViewerControlTarget.ts:582

Parameters ​

address ​

LayerControlAddress

opacity ​

number

Returns ​

ControlCommandResult

Implementation of ​

SurfViewControlTarget.setLayerOpacity


setLayerBlendMode() ​

ts
setLayerBlendMode(address, blendMode): ControlCommandResult;

Defined in: controls/ViewerControlTarget.ts:594

Parameters ​

address ​

LayerControlAddress

blendMode ​

BlendMode

Returns ​

ControlCommandResult

Implementation of ​

SurfViewControlTarget.setLayerBlendMode


setLayerOrder() ​

ts
setLayerOrder(surfaceId, layerIds): ControlCommandResult;

Defined in: controls/ViewerControlTarget.ts:606

Parameters ​

surfaceId ​

string

layerIds ​

readonly string[]

Returns ​

ControlCommandResult

Implementation of ​

SurfViewControlTarget.setLayerOrder


updateScalarMapping() ​

ts
updateScalarMapping(address, update): ControlCommandResult;

Defined in: controls/ViewerControlTarget.ts:628

Parameters ​

address ​

LayerControlAddress

update ​

ScalarMappingUpdate

Returns ​

ControlCommandResult

Implementation of ​

SurfViewControlTarget.updateScalarMapping


setInspectionSelection() ​

ts
setInspectionSelection(selection): ControlCommandResult;

Defined in: controls/ViewerControlTarget.ts:680

Parameters ​

selection ​

InspectionSelection

Returns ​

ControlCommandResult

Implementation of ​

SurfViewControlTarget.setInspectionSelection


applyFigurePreset() ​

ts
applyFigurePreset(presetId): ControlCommandResult;

Defined in: controls/ViewerControlTarget.ts:697

Parameters ​

presetId ​

string

Returns ​

ControlCommandResult

Implementation of ​

SurfViewControlTarget.applyFigurePreset


setFigureBackground() ​

ts
setFigureBackground(background, transparent?): ControlCommandResult;

Defined in: controls/ViewerControlTarget.ts:715

Parameters ​

background ​

number

transparent? ​

boolean = false

Returns ​

ControlCommandResult

Implementation of ​

SurfViewControlTarget.setFigureBackground


exportFigure() ​

ts
exportFigure(request?): Promise<ControlCommandResult<FigureExportResult>>;

Defined in: controls/ViewerControlTarget.ts:736

Parameters ​

request? ​

FigureExportRequest = {}

Returns ​

Promise<ControlCommandResult<FigureExportResult>>

Implementation of ​

SurfViewControlTarget.exportFigure


setDisplayedLayer() ​

ts
setDisplayedLayer(_layerId): ControlCommandResult;

Defined in: controls/ViewerControlTarget.ts:785

Returns unsupported when ExclusiveMapCapability is absent.

Parameters ​

_layerId ​

string

Returns ​

ControlCommandResult

Implementation of ​

SurfViewControlTarget.setDisplayedLayer

Released under the MIT License.