Class: SliceController
Defined in: src/display/SliceController.ts:18
The SliceController handles user input events related to slice navigation.
- We track mouse movement to update mouse coordinates (image, voxel, world).
- We handle mouse clicks to update the model's crosshair coordinate, causing the slice to re-center or reslice as appropriate.
Implements
Constructors
Constructor
new SliceController(
model,
view,
neuroSpace,
viewAxes): SliceController;Defined in: src/display/SliceController.ts:58
Parameters
model
view
neuroSpace
viewAxes
Returns
SliceController
Properties
mouseImagePosition
mouseImagePosition:
| {
x: number;
y: number;
}
| null = null;Defined in: src/display/SliceController.ts:28
(1) The local 2D slice coordinate [x, y], in the "slice" plane (pixels).
Implementation of
ISliceController.mouseImagePosition
mouseVolumeCoordinate
mouseVolumeCoordinate: number[] | null = null;Defined in: src/display/SliceController.ts:35
(2) The pinned-volume coordinate [i, j, k] in voxel space, as returned by sliceToVolumeCoord(...). This might be fractional if partial pixels are selected.
Implementation of
ISliceController.mouseVolumeCoordinate
mouseWorldCoordinate
mouseWorldCoordinate: number[] | null = null;Defined in: src/display/SliceController.ts:41
(3) The original "world" coordinate [X, Y, Z] in real-world mm, i.e. un-pinned "raw" NeuroSpace.
Implementation of
ISliceController.mouseWorldCoordinate
Methods
setEnabled()
setEnabled(enabled): void;Defined in: src/display/SliceController.ts:253
Enable or disable the controller
Parameters
enabled
boolean
Returns
void
Implementation of
isEnabled()
isEnabled(): boolean;Defined in: src/display/SliceController.ts:260
Check if the controller is enabled
Returns
boolean
Implementation of
dispose()
dispose(): void;Defined in: src/display/SliceController.ts:267
Cleans up event listeners.
Returns
void