Brightness adjustment crashes when trying to invert contrast
martinschorb opened this issue · 3 comments
martinschorb commented
Hi,
-
Select
Set Sources Brightness
-
choose
min>max
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException
at bdv.util.Bounds.<init>(Bounds.java:48)
at bdv.viewer.ConverterSetupBounds.getExtendedBounds(ConverterSetupBounds.java:104)
at java.util.HashMap.compute(HashMap.java:1197)
at bdv.viewer.ConverterSetupBounds.getBounds(ConverterSetupBounds.java:61)
at bdv.ui.convertersetupeditor.BoundedRangeEditor.updateRangePanel(BoundedRangeEditor.java:203)
at bdv.ui.convertersetupeditor.BoundedRangeEditor.lambda$new$3(BoundedRangeEditor.java:119)
at bdv.viewer.ConverterSetups.lambda$null$0(ConverterSetups.java:79)
at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:891)
at bdv.viewer.ConverterSetups.lambda$new$1(ConverterSetups.java:79)
at bdv.util.ARGBColorConverterSetup.lambda$setDisplayRange$0(ARGBColorConverterSetup.java:77)
at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:891)
at bdv.util.ARGBColorConverterSetup.setDisplayRange(ARGBColorConverterSetup.java:77)
at sc.fiji.bdvpg.sourceandconverter.display.BrightnessAdjuster.run(BrightnessAdjuster.java:50)
at sc.fiji.bdvpg.scijava.command.source.BrightnessAdjusterCommand.run(BrightnessAdjusterCommand.java:82)
at org.scijava.command.InteractiveCommand.preview(InteractiveCommand.java:95)
at org.scijava.widget.DefaultWidgetModel.lambda$setValue$0(DefaultWidgetModel.java:176)
at org.scijava.thread.DefaultThreadService.lambda$wrap$1(DefaultThreadService.java:211)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
tischi commented
@NicoKiaru
I also found out that RealARGBColorConverter
does return black values if max < min
. Thus, to support this I think we would need another converter. I will look into this for MoBIE and keep you posted.
NicoKiaru commented
Hmm, too bad it throws an error... I think before the refactoring it wasn't crashing but giving nonsense colors, which is not so much better
NicoKiaru commented
I think this issue should go in bigdataviewer-core. I'll post an issue there and close this one: