Skip to content

fix: re-enable THUMBNAIL images in the volume pyramid (#318)#389

Draft
igoroctaviano wants to merge 5 commits into
masterfrom
fix/318-reenable-thumbnails
Draft

fix: re-enable THUMBNAIL images in the volume pyramid (#318)#389
igoroctaviano wants to merge 5 commits into
masterfrom
fix/318-reenable-thumbnails

Conversation

@igoroctaviano

Copy link
Copy Markdown
Collaborator

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-viewer to the released version (expected ^0.48.22) plus a lockfile update. Bumping now would desync pnpm-lock.yaml, so it is intentionally left out.

Summary

Removes the skipThumbnails: true workaround (added in 43406ea) so THUMBNAIL images 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: _computeImagePyramid rounded each level's zoom factor to the nearest integer. VOLUME levels are clean power-of-two downsamples (integer ratios), but a THUMBNAIL is not — e.g. a base/level column ratio of 57.70 was rounded to 58, 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

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
@deepsource-io

deepsource-io Bot commented Jun 5, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in dfcb20b...3554c8e on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

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.

@sonarqubecloud

sonarqubecloud Bot commented Jun 7, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant