Repository navigation
MRI viewer: PACS-style window presets and an Invert toggle - #358
Merged
Merged
Conversation
MRI scans get windows from the scan's own intensity distribution, since MRI has no fixed units. The preset list is now Auto, Low contrast, Medium contrast, High contrast and Full range. Low, Medium and High follow the usual PACS automatic presets and drop 1%, 5% and 10% of the foreground voxels from each end of the range (narrower window, more contrast). The old "High contrast" window, which only raised the lower bound, is replaced. ScanAnalysis gains the extra foreground percentiles these need. The View menu gets an Invert toggle (state shown in place, like Hover identify and Reference lines). It flips the grayscale of every pane through Cornerstone's invert property and is re-applied when the viewports are rebuilt. It is not saved between visits. Tests: preset names, trim edges and ordering in scanModality.test.ts; a viewer smoke test for the Invert menu item. Ablations: changing the High contrast trim fails the preset tests; making the Invert click a no-op fails the smoke test. Checked in a real browser with a synthetic MRI NIfTI: the scan is detected as MRI, the five presets are listed, and Invert flips all three panes.
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.
What
MRI window presets. MRI has no fixed units, so its windows come from the scan's own intensity distribution. The list is now Auto, Low contrast, Medium contrast, High contrast and Full range. Low, Medium and High follow the usual PACS automatic presets: they drop 1%, 5% and 10% of the foreground voxels from each end of the range, so a larger trim gives a narrower window and more contrast. This replaces the old "High contrast" window, which only raised the lower bound.
ScanAnalysisgains the extra foreground percentiles these need. CT presets are unchanged.Invert. The View menu gets an Invert toggle (state shown in place like Hover identify and Reference lines; no controls moved). It flips the grayscale of every pane through Cornerstone's
invertproperty and is re-applied when the viewports are rebuilt. It is not saved between visits and applies to CT as well as MRI.Tests
scanModality.test.ts: preset names, trim edges and ordering.viewer.smoke.test.tsx: the Invert menu item toggles and shows its state.Not verified / not changed