Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brightness adjustment crashes when trying to invert contrast #223

Closed
martinschorb opened this issue May 14, 2021 · 3 comments
Closed

Brightness adjustment crashes when trying to invert contrast #223

martinschorb opened this issue May 14, 2021 · 3 comments

Comments

@martinschorb
Copy link
Collaborator

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
Copy link
Collaborator

tischi commented May 16, 2021

@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
Copy link
Collaborator

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
Copy link
Collaborator

I think this issue should go in bigdataviewer-core. I'll post an issue there and close this one:

See bigdataviewer/bigdataviewer-core#187

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

No branches or pull requests

3 participants