NOTICE! This is a static HTML version of a legacy ImageJ Trac ticket.

The ImageJ project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Ticket #761 (closed defect: fixed)

Opened 2011-09-16T13:29:46-05:00

Last modified 2012-09-11T16:41:32-05:00

Selection > Make Inverse throws exception

Reported by: afraser Owned by: dscho
Priority: major Milestone: imagej2-b4-plugins
Component: Legacy Compatibility Version:
Severity: serious Keywords: Make Inverse
Cc: Blocked By:
Blocking: #1011


Create a new image and draw an overlay in it, then choose Edit > Selection > Make Inverse. The feature appears to sort-of work, but the resultant overlay cannot be moved and it throws the following exception.

Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException

at java.util.concurrent.ConcurrentHashMap.containsKey(
at imagej.ui.swing.display.SwingDisplayPanel.createSliders(
at imagej.ui.swing.display.SwingDisplayPanel.access$1(
at imagej.ui.swing.display.SwingDisplayPanel$
at java.awt.event.InvocationEvent.dispatch(
at java.awt.EventQueue.dispatchEventImpl(
at java.awt.EventQueue.access$000(
at java.awt.EventQueue$
at java.awt.EventQueue$
at Method)
at java.awt.EventQueue.dispatchEvent(
at imagej.ui.common.awt.AWTKeyEventDispatcherGlobal.dispatchEvent(
at java.awt.EventDispatchThread.pumpOneEventForFilters(
at java.awt.EventDispatchThread.pumpEventsForFilter(
at java.awt.EventDispatchThread.pumpEventsForHierarchy(
at java.awt.EventDispatchThread.pumpEvents(
at java.awt.EventDispatchThread.pumpEvents(

Change History

comment:1 Changed 2012-02-26T21:12:18-06:00 by curtis

  • Blocking 1011 added

comment:2 Changed 2012-03-05T11:04:57-06:00 by curtis

  • Owner changed from curtis to dscho
  • Status changed from new to assigned

comment:3 Changed 2012-03-08T13:22:08-06:00 by dscho

It appears that this does not happen anymore.

But it does not work correctly either: instead of showing an overlay with a hole (and handles so you could move things), it shows some kind of red-transparent overlay (similar to IJ1's threshold, which is not transparent though) and no handles, and a subsequent Make Inverse claims that there is no area selection.

comment:4 Changed 2012-03-12T11:14:44-05:00 by curtis

See also #878.

comment:5 Changed 2012-03-29T11:49:15-05:00 by curtis

  • Milestone changed from imagej-2.0-beta1 to imagej-2.0-beta2

Finishing this work will have to wait till beta2, as we are too short on time.

comment:6 Changed 2012-07-12T14:18:40-05:00 by curtis

  • Milestone changed from imagej-2.0.0-beta3 to imagej-2.0.0-beta4

comment:7 Changed 2012-09-06T19:02:49-05:00 by dscho

  • Milestone changed from imagej-2.0.0-beta4 to imagej-2.0.0-beta5

comment:8 Changed 2012-09-11T16:40:56-05:00 by dscho

  • Status changed from assigned to closed
  • Resolution set to fixed

This is fixed with the addition of composite ROIs.

comment:9 Changed 2012-09-11T16:41:32-05:00 by curtis

  • Milestone changed from imagej-2.0.0-beta5 to imagej-2.0.0-beta4