Skip to content

Class: SliceCoordinator ​

Defined in: src/core/SliceCoordinator.ts:16

Constructors ​

Constructor ​

ts
new SliceCoordinator(config?): SliceCoordinator;

Defined in: src/core/SliceCoordinator.ts:19

Parameters ​

config? ​

Partial<SliceAccessConfig>

Returns ​

SliceCoordinator

Methods ​

validateSliceAccess() ​

ts
validateSliceAccess(
   sliceIndex, 
   axis, 
   volStack, 
   include?): SliceAccessResult;

Defined in: src/core/SliceCoordinator.ts:35

Validates and normalizes slice access across all volumes in a stack.

Parameters ​

sliceIndex ​

number

axis ​

AxisSet3D

volStack ​

VolStack

include? ​

(volumeIndex) => boolean

Optional filter. Volumes it rejects do not share the reference slice index (they pick their own plane), so they are passed through unchanged and never clamped, warned about or counted as adjusted.

Returns ​

SliceAccessResult


getValidSliceRange() ​

ts
getValidSliceRange(axis, volStack): [number, number];

Defined in: src/core/SliceCoordinator.ts:93

Returns the valid slice range that works for all volumes in the stack

Parameters ​

axis ​

AxisSet3D

volStack ​

VolStack

Returns ​

[number, number]


getVolumeDimensions() ​

ts
getVolumeDimensions(volStack, axis): VolumeSliceDimensions[];

Defined in: src/core/SliceCoordinator.ts:111

Gets dimension information for all volumes in the stack

Parameters ​

volStack ​

VolStack

axis ​

AxisSet3D

Returns ​

VolumeSliceDimensions[]


setConfig() ​

ts
setConfig(config): void;

Defined in: src/core/SliceCoordinator.ts:193

Updates the slice access configuration

Parameters ​

config ​

Partial<SliceAccessConfig>

Returns ​

void


getConfig() ​

ts
getConfig(): SliceAccessConfig;

Defined in: src/core/SliceCoordinator.ts:200

Gets the current configuration

Returns ​

SliceAccessConfig


getSafeSliceIndices() ​

ts
getSafeSliceIndices(
   volStack, 
   axis, 
   count?): number[];

Defined in: src/core/SliceCoordinator.ts:207

Utility method to get safe slice indices for testing

Parameters ​

volStack ​

VolStack

axis ​

AxisSet3D

count? ​

number = 3

Returns ​

number[]

Released under the MIT License.