@@ -48,6 +48,7 @@ public class NavigationActions extends Actions
4848 public static final String TOGGLE_INTERPOLATION = "toggle interpolation" ;
4949 public static final String TOGGLE_FUSED_MODE = "toggle fused mode" ;
5050 public static final String TOGGLE_GROUPING = "toggle grouping" ;
51+ public static final String TOGGLE_BLEND_MODE = "toggle blending mode" ;
5152 public static final String SET_CURRENT_SOURCE = "set current source %d" ;
5253 public static final String TOGGLE_SOURCE_VISIBILITY = "toggle source visibility %d" ;
5354 public static final String ALIGN_XY_PLANE = "align XY plane" ;
@@ -59,6 +60,7 @@ public class NavigationActions extends Actions
5960 public static final String [] TOGGLE_INTERPOLATION_KEYS = new String [] { "I" };
6061 public static final String [] TOGGLE_FUSED_MODE_KEYS = new String [] { "F" };
6162 public static final String [] TOGGLE_GROUPING_KEYS = new String [] { "G" };
63+ public static final String [] TOGGLE_BLEND_MODE_KEYS = new String [] { "U" };
6264 public static final String SET_CURRENT_SOURCE_KEYS_FORMAT = "%s" ;
6365 public static final String TOGGLE_SOURCE_VISIBILITY_KEYS_FORMAT = "shift %s" ;
6466 public static final String [] ALIGN_XY_PLANE_KEYS = new String [] { "shift Z" };
@@ -84,6 +86,7 @@ public void getCommandDescriptions( final CommandDescriptions descriptions )
8486 descriptions .add ( TOGGLE_INTERPOLATION , TOGGLE_INTERPOLATION_KEYS , "Switch between nearest-neighbor and n-linear interpolation mode in BigDataViewer." );
8587 descriptions .add ( TOGGLE_FUSED_MODE , TOGGLE_FUSED_MODE_KEYS , "TODO" );
8688 descriptions .add ( TOGGLE_GROUPING , TOGGLE_GROUPING_KEYS , "TODO" );
89+ descriptions .add ( TOGGLE_BLEND_MODE , TOGGLE_BLEND_MODE_KEYS , "Switch between summing and averaging (and possibly custom blending) of overlapping sources" );
8790
8891 final String [] numkeys = new String [] { "1" , "2" , "3" , "4" , "5" , "6" , "7" , "8" , "9" , "0" };
8992 IntStream .range ( 0 , numkeys .length ).forEach ( i -> {
@@ -121,6 +124,9 @@ public static void installModeActions( final Actions actions, final ViewerState
121124 actions .runnableAction ( () -> toggleInterpolation ( state ), TOGGLE_INTERPOLATION , TOGGLE_INTERPOLATION_KEYS );
122125 actions .runnableAction ( () -> toggleFusedMode ( state ), TOGGLE_FUSED_MODE , TOGGLE_FUSED_MODE_KEYS );
123126 actions .runnableAction ( () -> toggleGroupingMode ( state ), TOGGLE_GROUPING , TOGGLE_GROUPING_KEYS );
127+
128+ final BlendModeSwitcher blending = new BlendModeSwitcher ( state );
129+ actions .runnableAction ( blending ::switchToNextMode , TOGGLE_BLEND_MODE , TOGGLE_BLEND_MODE_KEYS );
124130 }
125131
126132 public static void installTimeActions ( final Actions actions , final ViewerState state )
0 commit comments