Skip to content

Commit f859a92

Browse files
Set local svs bounding box
1 parent 185762c commit f859a92

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

packages/core/src/tile/factories/imageFactory.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ registerAssetFactory(
3131
headers: { Authorization: `Bearer ${opts.token}` }
3232
}).then(response => response.arrayBuffer()).then(buffer => new File([buffer as BlobPart], "image.svs")).then(file => openslide.open(file)) : await openslide.open(opts.uri);
3333
const extent = await image.getLevelDimensions(0);
34-
const extent_max = await image.getLevelDimensions(await image.getLevelCount());
34+
const extent_max = await image.getLevelDimensions(await image.getLevelCount() - 1);
3535
ctx.sceneOptions.extents.encapsulateBoundingInfo(
3636
new BoundingInfo(new Vector3(0, 0, 0), new Vector3(extent[0], extent[1], 0))
3737
);
@@ -106,6 +106,10 @@ registerAssetFactory(
106106
] as MathArray)
107107
};
108108

109+
ctx.sceneOptions.extents.encapsulateBoundingInfo(
110+
metadata.root.boundingInfo
111+
);
112+
109113
return {
110114
manager: new ImageManager(ctx.scene, ctx.workerPool, {
111115
metadata,

0 commit comments

Comments
 (0)