Skip to content

Interface: ISliceModel ​

Defined in: src/display/interfaces/ISliceModel.ts:5

Interface for the slice model component that manages slice state and coordinates

Properties ​

currentCoord ​

ts
readonly currentCoord: number[];

Defined in: src/display/interfaces/ISliceModel.ts:9

Current coordinate in the volume space


currentSliceIndex ​

ts
readonly currentSliceIndex: number;

Defined in: src/display/interfaces/ISliceModel.ts:14

Current slice index


totalSlices ​

ts
readonly totalSlices: number;

Defined in: src/display/interfaces/ISliceModel.ts:19

Total number of slices available

Methods ​

setCurrentCoord() ​

ts
setCurrentCoord(coord): void;

Defined in: src/display/interfaces/ISliceModel.ts:24

Sets the current coordinate in volume space

Parameters ​

coord ​

number[]

Returns ​

void


setCurrentSliceIndex() ​

ts
setCurrentSliceIndex(index): void;

Defined in: src/display/interfaces/ISliceModel.ts:29

Sets the current slice index

Parameters ​

index ​

number

Returns ​

void


previousSlice() ​

ts
previousSlice(): void;

Defined in: src/display/interfaces/ISliceModel.ts:34

Navigate to the previous slice

Returns ​

void


nextSlice() ​

ts
nextSlice(): void;

Defined in: src/display/interfaces/ISliceModel.ts:39

Navigate to the next slice

Returns ​

void


onCoordChange() ​

ts
onCoordChange(callback): IReactionDisposer;

Defined in: src/display/interfaces/ISliceModel.ts:46

Subscribe to coordinate changes

Parameters ​

callback ​

(coord) => void

Function called when coordinates change

Returns ​

IReactionDisposer

Disposal function to unsubscribe


onSliceIndexChange() ​

ts
onSliceIndexChange(callback): IReactionDisposer;

Defined in: src/display/interfaces/ISliceModel.ts:53

Subscribe to slice index changes

Parameters ​

callback ​

(index) => void

Function called when slice index changes

Returns ​

IReactionDisposer

Disposal function to unsubscribe


dispose() ​

ts
dispose(): void;

Defined in: src/display/interfaces/ISliceModel.ts:58

Dispose of the model and clean up resources

Returns ​

void

Released under the MIT License.