Import 2017-06-07 23:51:09: master 8852114a

Author Committer Branch Timestamp Parent
lassoan lassoan master 2016-12-02 15:17:50 master 3e1ec361
Changeset

ENH: Auto-select background/foreground volume for W/L change in slice viewer

If only foreground or background volume is selected then adjust the W/L of that.
If both foreground and background volumes are selected in a slice view:

  • if foreground volume visibility is >0, and the user clicks on an area where the foreground volume is visible then the foreground volume's W/L is adjusted
  • otherwise (e.g., user clicks outside the foreground volume) background volume's W/L is adjusted

This solves the frequent issue of users accidentally changing W/L of the invisible background volume (covered by foreground volume).
It also makes it easier to change W/L of foreground and background volumes (user doesn't need to swap the foreground/background volumes manually).

git-svn-id: http://svn.slicer.org/Slicer4/trunk@25584 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Libs/MRML/DisplayableManager/vtkSliceViewInteractorStyle.cxx Diff File
mod - Libs/MRML/DisplayableManager/vtkSliceViewInteractorStyle.h Diff File