Skip to content

Fix CT window number inputs and update Liver preset#35

Merged
aperson30 merged 1 commit into
mainfrom
aditya/ct-window-inputs
Jun 27, 2026
Merged

Fix CT window number inputs and update Liver preset#35
aperson30 merged 1 commit into
mainfrom
aditya/ct-window-inputs

Conversation

@aperson30

Copy link
Copy Markdown
Collaborator

What

Fixes the Brightness/Contrast number inputs in the viewer's CT window panel and tweaks the Liver preset default.

Changes

  • Sync number boxes to the active window. The Brightness/Contrast number inputs were only seeded once on mount, so switching CT window presets (Soft Tissue/Bone/Lung/Liver) moved the sliders but left the number boxes stale. They now re-sync via useEffect whenever the window changes.
  • Apply on blur. Typing a Brightness/Contrast value now takes effect when you click off the field, not only when you press Enter (same clamping as before).
  • Liver preset default → Brightness 50 / Contrast 150 (width: 150, center: -50).

Notes

  • Brightness is the negated window center; the number box now matches the slider (both negated), fixing a prior textbox/slider mismatch.

- Sync the Brightness/Contrast number boxes to the active window so they
  update (not just the sliders) when switching CT window presets.
- Apply typed Brightness/Contrast values on blur, not only on Enter.
- Set Liver preset default to Brightness 50 / Contrast 150.
@aperson30 aperson30 merged commit 2cd9257 into main Jun 27, 2026
6 checks passed
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