Skip to content

Class: ViewerControlTarget ​

Defined in: controls/ViewerControlTarget.ts:333

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:351

Parameters ​

viewer ​

NeuroSurfaceViewer

options? ​

ViewerControlTargetOptions = {}

Returns ​

ViewerControlTarget

Methods ​

getSnapshot() ​

ts
getSnapshot(): SurfViewControlSnapshot;

Defined in: controls/ViewerControlTarget.ts:376

Returns ​

SurfViewControlSnapshot

Implementation of ​

SurfViewControlTarget.getSnapshot


getLayerDataSummary() ​

ts
getLayerDataSummary(address): ControlQueryResult<LayerDataSummaryControlDescriptor>;

Defined in: controls/ViewerControlTarget.ts:380

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:422

Parameters ​

listener ​

SurfViewControlSnapshotListener

Returns ​

SurfViewControlSubscription

Implementation of ​

SurfViewControlTarget.subscribe


isDisposed() ​

ts
isDisposed(): boolean;

Defined in: controls/ViewerControlTarget.ts:438

Returns ​

boolean

Implementation of ​

SurfViewControlTarget.isDisposed


dispose() ​

ts
dispose(): void;

Defined in: controls/ViewerControlTarget.ts:443

Returns ​

void

Implementation of ​

SurfViewControlTarget.dispose


setAnatomicalView() ​

ts
setAnatomicalView(request): ControlCommandResult;

Defined in: controls/ViewerControlTarget.ts:451

Parameters ​

request ​

SetAnatomicalViewRequest

Returns ​

ControlCommandResult

Implementation of ​

SurfViewControlTarget.setAnatomicalView


fitView() ​

ts
fitView(): ControlCommandResult;

Defined in: controls/ViewerControlTarget.ts:490

Returns ​

ControlCommandResult

Implementation of ​

SurfViewControlTarget.fitView


resetView() ​

ts
resetView(): ControlCommandResult;

Defined in: controls/ViewerControlTarget.ts:507

Returns ​

ControlCommandResult

Implementation of ​

SurfViewControlTarget.resetView


setSurfaceVisibility() ​

ts
setSurfaceVisibility(surfaceId, visible): ControlCommandResult;

Defined in: controls/ViewerControlTarget.ts:514

Parameters ​

surfaceId ​

string

visible ​

boolean

Returns ​

ControlCommandResult

Implementation of ​

SurfViewControlTarget.setSurfaceVisibility


setLayerVisibility() ​

ts
setLayerVisibility(address, visible): ControlCommandResult;

Defined in: controls/ViewerControlTarget.ts:526

Parameters ​

address ​

LayerControlAddress

visible ​

boolean

Returns ​

ControlCommandResult

Implementation of ​

SurfViewControlTarget.setLayerVisibility


setLayerOpacity() ​

ts
setLayerOpacity(address, opacity): ControlCommandResult;

Defined in: controls/ViewerControlTarget.ts:538

Parameters ​

address ​

LayerControlAddress

opacity ​

number

Returns ​

ControlCommandResult

Implementation of ​

SurfViewControlTarget.setLayerOpacity


setLayerBlendMode() ​

ts
setLayerBlendMode(address, blendMode): ControlCommandResult;

Defined in: controls/ViewerControlTarget.ts:550

Parameters ​

address ​

LayerControlAddress

blendMode ​

BlendMode

Returns ​

ControlCommandResult

Implementation of ​

SurfViewControlTarget.setLayerBlendMode


setLayerOrder() ​

ts
setLayerOrder(surfaceId, layerIds): ControlCommandResult;

Defined in: controls/ViewerControlTarget.ts:562

Parameters ​

surfaceId ​

string

layerIds ​

readonly string[]

Returns ​

ControlCommandResult

Implementation of ​

SurfViewControlTarget.setLayerOrder


updateScalarMapping() ​

ts
updateScalarMapping(address, update): ControlCommandResult;

Defined in: controls/ViewerControlTarget.ts:584

Parameters ​

address ​

LayerControlAddress

update ​

ScalarMappingUpdate

Returns ​

ControlCommandResult

Implementation of ​

SurfViewControlTarget.updateScalarMapping


setInspectionSelection() ​

ts
setInspectionSelection(selection): ControlCommandResult;

Defined in: controls/ViewerControlTarget.ts:636

Parameters ​

selection ​

InspectionSelection

Returns ​

ControlCommandResult

Implementation of ​

SurfViewControlTarget.setInspectionSelection


applyFigurePreset() ​

ts
applyFigurePreset(presetId): ControlCommandResult;

Defined in: controls/ViewerControlTarget.ts:653

Parameters ​

presetId ​

string

Returns ​

ControlCommandResult

Implementation of ​

SurfViewControlTarget.applyFigurePreset


setFigureBackground() ​

ts
setFigureBackground(background, transparent?): ControlCommandResult;

Defined in: controls/ViewerControlTarget.ts:671

Parameters ​

background ​

number

transparent? ​

boolean = false

Returns ​

ControlCommandResult

Implementation of ​

SurfViewControlTarget.setFigureBackground


exportFigure() ​

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

Defined in: controls/ViewerControlTarget.ts:692

Parameters ​

request? ​

FigureExportRequest = {}

Returns ​

Promise<ControlCommandResult<FigureExportResult>>

Implementation of ​

SurfViewControlTarget.exportFigure


setDisplayedLayer() ​

ts
setDisplayedLayer(_layerId): ControlCommandResult;

Defined in: controls/ViewerControlTarget.ts:741

Returns unsupported when ExclusiveMapCapability is absent.

Parameters ​

_layerId ​

string

Returns ​

ControlCommandResult

Implementation of ​

SurfViewControlTarget.setDisplayedLayer

Released under the MIT License.