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 #964 (closed defect: fixed)

Opened 2012-02-09T14:07:06-06:00

Last modified 2013-03-05T16:17:39-06:00

Make Binary broken

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: imagej2-b7-ndim-data
Component: Legacy Compatibility Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking: #1011, #1273

Description

Open CLown
Run "Threshold..." plugin and select some region within the histogram
Now run Make Binary
Command looks like it works (compared to IJ1) but two images are created instead of one. And an exception is thrown:

[ERROR] ImageJ 1.x plugin threw exception
java.lang.ArrayIndexOutOfBoundsException: 2

at net.imglib2.AbstractInterval.dimension(AbstractInterval.java:184)
at imagej.data.display.AbstractDatasetView.getChannelCount(AbstractDatasetView.java:342)
at imagej.data.display.AbstractDatasetView.updateLUTs(AbstractDatasetView.java:320)
at imagej.data.display.AbstractDatasetView.setColorTable(AbstractDatasetView.java:133)
at imagej.legacy.translate.ColorTableHarmonizer.assignColorTables(ColorTableHarmonizer.java:305)
at imagej.legacy.translate.ColorTableHarmonizer.updateDisplay(ColorTableHarmonizer.java:79)
at imagej.legacy.translate.Harmonizer.updateDisplay(Harmonizer.java:180)
at imagej.legacy.plugin.LegacyPlugin.updateDisplaysFromImagePluses(LegacyPlugin.java:281)
at imagej.legacy.plugin.LegacyPlugin.run(LegacyPlugin.java:161)

Change History

comment:1 Changed 2012-02-24T13:32:52-06:00 by curtis

  • Blocking 1011 added

comment:2 Changed 2012-03-27T10:47:12-05:00 by bdezonia

More recently behavior somewhat changed. Two images created and one goes away. Result looks correct. But during process an exceptions was thrown:

[ERROR] Exception during event handling:

[Event] imagej.data.event.DatasetRGBChangedEvent
context = imagej.ImageJ@5ca449e0
consumed = false
object = clown.jpg
[Subscriber] imagej.ui.swing.sdi.display.SwingSdiImageDisplay@26eb6935
[Method] protected void imagej.data.display.AbstractImageDisplay.onEvent(imagej.data.event.DataUpdatedEvent)

java.lang.ArrayIndexOutOfBoundsException: 2

at net.imglib2.img.ImgPlus.axis(ImgPlus.java:271)
at imagej.data.DefaultDataset.axis(DefaultDataset.java:342)
at imagej.data.CombinedInterval.axis(CombinedInterval.java:169)
at imagej.data.CombinedInterval.axes(CombinedInterval.java:175)
at imagej.data.CombinedInterval.getAxes(CombinedInterval.java:132)
at imagej.data.display.AbstractImageDisplay.getAxes(AbstractImageDisplay.java:248)
at imagej.data.display.AbstractImageDisplay.update(AbstractImageDisplay.java:234)
at imagej.data.display.AbstractImageDisplay.onEvent(AbstractImageDisplay.java:563)
at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at imagej.event.DefaultEventService$ProxySubscriber.onEvent(DefaultEventService.java:224)
at imagej.event.DefaultEventService$ProxySubscriber.onEvent(DefaultEventService.java:1)
at org.bushe.swing.event.ThreadSafeEventService.publish(ThreadSafeEventService.java:971)
at org.bushe.swing.event.SwingEventService.access$001(SwingEventService.java:31)
at org.bushe.swing.event.SwingEventService$1.run(SwingEventService.java:88)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:677)
at java.awt.EventQueue.access$000(EventQueue.java:85)
at java.awt.EventQueue$1.run(EventQueue.java:638)
at java.awt.EventQueue$1.run(EventQueue.java:636)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:647)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

comment:3 Changed 2012-05-14T12:08:16-05:00 by bdezonia

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

comment:4 Changed 2012-07-12T17:02:55-05:00 by curtis

  • Blocking 1273 added

comment:5 Changed 2012-07-12T17:27:04-05:00 by curtis

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

comment:6 Changed 2012-08-03T13:39:12-05:00 by curtis

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

comment:7 Changed 2012-10-10T13:52:21-05:00 by curtis

  • Milestone changed from imagej-2.0.0-beta6 to imagej-2.0.0-beta7

comment:8 Changed 2013-02-08T11:51:58-06:00 by bdezonia

  • Owner changed from curtis to bdezonia

Thresholding was recently added. With commit 7f4701862f88ebbc518e82ec884c7660c5361150 those thresholds are maintained across the legacy layer. As a result the Make Binary command appears to work now.

comment:9 Changed 2013-02-08T11:52:04-06:00 by bdezonia

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

comment:10 Changed 2013-03-05T16:17:39-06:00 by bdezonia

  • Milestone changed from imagej2-b8-analysis to imagej2-b7-ndim-data