feat: Add gamma correction toggle - #385
Conversation
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| JavaScript | Aug 5, 2026 5:06p.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.
|
|
@igoroctaviano let's merge this. |
Resolve conflict in DMV type defs by keeping master's Uint8Array palette data types and the gamma correction option from this branch.
|
|
Visit the preview URL for this PR (updated for commit 51dd4cc): https://idc-external-006--pr385-feat-gamma-toggle-t4piythp.web.app (expires Wed, 12 Aug 2026 17:09:00 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 88aacecd98ba54d2f9c8d201a9444e43d1ad8307 |



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