ImageLayer
A layer that renders a 2D slice of a chunked, multi-channel image source.
ImageLayer streams chunks from a ChunkSource (e.g. OmeZarrImageSource) according to the supplied ImageSourcePolicy, which decides which resolution levels and chunks to load for the current view. Per-channel appearance (contrast limits, color, visibility) is controlled via ChannelProps, and the visible slice is selected with SliceCoordinates.
Extends Layer and inherits all public properties and methods.
Implements
ChannelsEnabled
Constructor
ts
new ImageLayer(__namedParameters): ImageLayer;| Parameter | Type |
|---|---|
__namedParameters | LayerProps & { source: ChunkSource; sliceCoords: SliceCoordinates; policy?: Readonly<{ profile: string; prefetch: { x: number; y: number; z: number; t: number; }; priorityOrder: readonly ( | "fallbackVisible" | "prefetchTime" | "visibleCurrent" | "fallbackBackground" | "prefetchSpace")[]; priorityMap: Readonly<Record<PriorityCategory, number>>; lod: { min: number; max: number; bias: number; }; }>; orientation?: SliceOrientation; channelProps?: ChannelProps[]; onPickValue?: (info) => void; } |
Properties
type overrides
ts
readonly type: "ImageLayer" = "ImageLayer";Accessors
orientation SliceOrientation
ts
get orientation(): SliceOrientation;lastPresentationTimeCoord number | undefined
ts
get lastPresentationTimeCoord(): number | undefined;chunkStoreView ChunkStoreView | undefined
ts
get chunkStoreView(): ChunkStoreView | undefined;sliceCoords SliceCoordinates
ts
get sliceCoords(): SliceCoordinates;source ChunkSource
ts
get source(): ChunkSource;imageSourcePolicy Readonly<ImageSourcePolicy>
ts
get imageSourcePolicy(): Readonly<ImageSourcePolicy>;ts
set imageSourcePolicy(newPolicy): void;| Parameter | Type |
|---|---|
newPolicy | ImageSourcePolicy |
debugMode boolean
ts
get debugMode(): boolean;ts
set debugMode(debug): void;| Parameter | Type |
|---|---|
debug | boolean |
channelProps ChannelProps[] | undefined
ts
get channelProps(): ChannelProps[] | undefined;Methods
attach() void overrides
ts
protected attach(context): void;| Parameter | Type |
|---|---|
context | IdetikContext |
detach() void overrides
ts
protected detach(_context): void;| Parameter | Type |
|---|---|
_context | IdetikContext |
update() void overrides
ts
update(viewport?): void;| Parameter | Type |
|---|---|
viewport? | Viewport |
setOrientation() void
Changes the slice orientation at runtime. Visible renderables are rebuilt for the new plane, chunks already resident in the shared cache are reused.
ts
setOrientation(orientation): void;| Parameter | Type |
|---|---|
orientation | SliceOrientation |
onEvent() void overrides
ts
onEvent(event): void;| Parameter | Type |
|---|---|
event | EventContext |
getValueAtWorld() Promise<number | null>
ts
getValueAtWorld(world): Promise<number | null>;| Parameter | Type |
|---|---|
world | vec3 |
setChannelProps() void
ts
setChannelProps(channelProps): void;| Parameter | Type |
|---|---|
channelProps | ChannelProps[] |
resetChannelProps() void
ts
resetChannelProps(): void;addChannelChangeCallback() void
ts
addChannelChangeCallback(callback): void;| Parameter | Type |
|---|---|
callback | () => void |
removeChannelChangeCallback() void
ts
removeChannelChangeCallback(callback): void;| Parameter | Type |
|---|---|
callback | () => void |