fix: re-enable THUMBNAIL images in the volume pyramid (#318)#389
Draft
igoroctaviano wants to merge 5 commits into
Draft
fix: re-enable THUMBNAIL images in the volume pyramid (#318)#389igoroctaviano wants to merge 5 commits into
igoroctaviano wants to merge 5 commits into
Conversation
Removes the skipThumbnails workaround that was added to avoid annotation misplacement when a THUMBNAIL image is present (#318). The underlying cause was in dicom-microscopy-viewer, which rounded the per-level zoom factor and thereby mis-scaled THUMBNAIL levels. With that fixed upstream (ImagingDataCommons/dicom-microscopy-viewer#245), thumbnails can be part of the rendered pyramid again, restoring fast initial load without misplacing annotations. Requires dicom-microscopy-viewer >= 0.48.22 (the release containing the fix). Refs #318
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| JavaScript | Jun 7, 2026 8:28p.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
…318-reenable-thumbnails
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Important
Draft — depends on ImagingDataCommons/dicom-microscopy-viewer#245.
Do not merge until that fix is released. This PR also needs a follow-up bump of
dicom-microscopy-viewerto the released version (expected^0.48.22) plus a lockfile update. Bumping now would desyncpnpm-lock.yaml, so it is intentionally left out.Summary
Removes the
skipThumbnails: trueworkaround (added in43406ea) soTHUMBNAILimages are rendered as part of the volume pyramid again. This restores the faster initial load that the thumbnail provides (requested in #318) without re-introducing the annotation misplacement.Background
#318: when a series contains a
THUMBNAIL, the slide "jumps" and annotations render in the wrong place while zooming. The root cause was in dicom-microscopy-viewer:_computeImagePyramidrounded each level's zoom factor to the nearest integer.VOLUMElevels are clean power-of-two downsamples (integer ratios), but aTHUMBNAILis not — e.g. a base/level column ratio of57.70was rounded to58, a ~0.5% scale error that drifts the upsampled thumbnail image relative to the (correctly placed) annotations. The workaround here simply dropped thumbnails from the pyramid, which also dodged the faster-load benefit.The upstream fix (DMV#245) computes exact, non-rounded resolutions so every level — including the thumbnail — stays aligned to the base coordinate system.
Test plan
tsc --noEmitpassesbiome checkpassesdicom-microscopy-viewer+ lockfile