Conversation
✅ Deploy Preview for biongff-vizarr ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for z-downsampling ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
https://deploy-preview-36--z-downsampling.netlify.app/?source=https://s3.janelia.org/cellmap/jrc_ut21-1413-003/jrc_ut21-1413-003.zarr/recon-1/em/fibsem-uint8/ is working nicely as before (great to have the netlify deploy 👍 ) Also tested a couple of other images and all looks good. |
dannda
left a comment
There was a problem hiding this comment.
works great, thank you!
was wondering if it is any worth having originalSizeZ also as a readonly property to simplify. Adding it to the ZarrPixelSourceOptions as optional, and providing it in loadOmeMultiscales like
const loader = data.map(
(arr, i) =>
new ZarrPixelSource(arr, {
labels: axis_labels,
tileSize,
originalSizeZ: data[0].shape[axis_labels.indexOf("z")], // Set originalSizeZ for all ZarrPixelSource arrays so they can adjust for Z downsampling
...(i === 0 ? { meta: { physicalSizes } } : {}),
}),
);to avoid the additional loop to set it
also ensuring the recalculation is performed only when necessary
recalculateZSelection(z: number, zIndex: number): number {
if (this.originalSizeZ && this.originalSizeZ !== this.shape[zIndex]) {
return Math.floor((z * this.shape[zIndex]) / this.originalSizeZ);
}
return z;
}as multiscales will have originalSizeZ but without meaning they've been downsampled (or maybe originalSizeZ should only be defined when it's actually downsampled?)
|
Thanks @dannda, I have made those changes and added some missing documentation. |
Description
Recalculate Z-index for images which are downscaled in z-index
Fixes # (issue)
Closes #16
Type of change
Checklist
npm test)pre-commit run --all-files)