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

Opened 2011-06-09T11:41:58-05:00

Last modified 2011-06-09T12:22:26-05:00

AbstractDatasetView assumes Dataset has at least one channel

Reported by: bdezonia Owned by: curtis
Priority: major Milestone: imagej2-b1-initial
Component: Display API Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking:

Description

AbstractDatasetView can throw exceptions for Datasets that do not have a channel axis defined.

To see the problem use File Open [IJ2] and open some 2d image. Now use Image :: Transform :: Rotate 90 Degrees Right. An Exception is thrown (see below).

Note that any fix for this that does not force all 2d images to have a channel index should fix LegacyUtils::orderedAxes(). It always includes a channel axis during its translations to avoid this problem.

Exception:

Caused by: java.lang.ArrayIndexOutOfBoundsException: -1

at imagej.display.AbstractDatasetView.rebuild(AbstractDatasetView.java:205)
at imagej.display.AbstractDisplayView$2.onEvent(AbstractDisplayView.java:168)
at imagej.display.AbstractDisplayView$2.onEvent(AbstractDisplayView.java:1)
at org.bushe.swing.event.ThreadSafeEventService.publish(ThreadSafeEventService.java:971)

Change History

comment:1 Changed 2011-06-09T12:22:26-05:00 by curtis

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

Fixed in 5f7062d65525db7c2eafd8bddd1ce35ffe5c3dda.