Skip to content

fix: prevent FRACTIONAL colormap from being replaced on opacity change - #431

Open
igoroctaviano wants to merge 1 commit into
masterfrom
fix/fractional-lut-binarized-on-opacity
Open

fix: prevent FRACTIONAL colormap from being replaced on opacity change#431
igoroctaviano wants to merge 1 commit into
masterfrom
fix/fractional-lut-binarized-on-opacity

Conversation

@igoroctaviano

Copy link
Copy Markdown
Collaborator

Summary

Fix bug where FRACTIONAL segmentation colormaps get binarized (replaced with flat color LUT) when adjusting the opacity slider.

Root cause: SegmentItem.handleOpacityChange was always sending color along with opacity in the style options. For FRACTIONAL segments, this caused SlideViewer.handleSegmentStyleChange to create a new paletteColorLookupTable from that flat color, replacing the distinct colormap that was originally assigned.

Fix: handleOpacityChange now only sends opacity. Color changes are handled separately by handleColorChange, which is already hidden in the UI for FRACTIONAL segments.

Test plan

Fixes #428

The handleOpacityChange function was always sending color along with opacity,
which caused SlideViewer.handleSegmentStyleChange to create a new palette
from that flat color, replacing the distinct colormap used by FRACTIONAL
segments.

Now handleOpacityChange only sends opacity. Color changes are handled
separately by handleColorChange, which is already hidden in the UI for
FRACTIONAL segments.

Fixes #428
@deepsource-io

deepsource-io Bot commented Aug 29, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in a2912f1...d84e5e9 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 Aug 29, 2026 1:38p.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

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

📦 Firebase Preview - Using Published DMV

This preview is using the published dicom-microscopy-viewer from package.json:

Version ^0.48.24

To link a DMV branch for testing (requires an open PR in DMV):

  • Add dmv-branch: <branch-name> to the PR description, OR
  • Use the same branch name in both repos (automatic matching)

@github-actions

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit d84e5e9):

https://idc-external-006--pr431-fix-fractional-lut-b-bq5np3b5.web.app

(expires Sat, 05 Sep 2026 13:40:14 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 88aacecd98ba54d2f9c8d201a9444e43d1ad8307

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.

FRACTIONAL color LUT binarized once opacity is touched

1 participant