feat: Add gamma correction toggle#385
Open
igoroctaviano wants to merge 1 commit into
Open
Conversation
|
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| JavaScript | May 18, 2026 8:58a.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.
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.



Summary
Adds a Gamma correction switch in Settings → Display (next to ICC Profiles) so users can enable/disable palette display gamma compensation at runtime.
Depends on DMV exposing
setPaletteDisplayGammaCorrectionEnabled/getPaletteDisplayGammaCorrectionEnabled(slim#384, follow-up to dicom-microscopy-viewer#211).DMV PR: (link
dmv-prbranch / PR here)What changed
SlideViewer.tsxisPaletteDisplayGammaCorrectionEnabled(initialized fromvolumeViewer.getPaletteDisplayGammaCorrectionEnabled()).handlePaletteDisplayGammaCorrectionToggle→volumeViewer.setPaletteDisplayGammaCorrectionEnabled(checked).constructViewerson route/slide change, reapplies stored preference viasetPaletteDisplayGammaCorrectionEnabled.SlideViewer/types.ts—isPaletteDisplayGammaCorrectionEnabledon component state.types/dicom-microscopy-viewer/index.d.tsVolumeImageViewerOptions.paletteDisplayGammaCorrectionsetPaletteDisplayGammaCorrectionEnabled/getPaletteDisplayGammaCorrectionEnabledPaletteColorLookupTable/buildPaletteColorLookupTablegamma optionsDependency
Bump
dicom-microscopy-viewerto a release that includes the gamma toggle API (after the DMV PR merges).Until then, local testing:
dicom-microscopy-viewer:bun link(ornpm link).slim:bun link dicom-microscopy-viewerand reinstall, or use"dicom-microscopy-viewer": "file:../dicom-microscopy-viewer"and runnpm run buildin DMV sodist/matchessrc/.How to test
Limitations
Related