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

Opened 2011-07-08T16:44:36-05:00

Last modified 2011-08-11T13:32:08-05:00

Stack To Images problematic with RGB input

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: imagej-2.0-alpha5
Component: Legacy Compatibility Version:
Severity: serious Keywords:
Cc: Blocked By:


The stack to images command does not react well with RGB data. Open Leaf and Edit Colors to grayscale. Now try Stack To Images. Usually it will complain that a stack is required. Sometimes it will reset the view luts so that the image colors change. And sometimes it throws an exception:

java.lang.IndexOutOfBoundsException: Index: 1, Size: 1

at java.util.ArrayList.RangeCheck(
at java.util.ArrayList.get(
at imagej.display.AbstractDatasetView.updateLUTs(
at imagej.display.AbstractDatasetView.setColorTable(
at imagej.legacy.LegacyUtils.assignColorTables(
at imagej.legacy.LegacyUtils.setDisplayLuts(
at imagej.legacy.DatasetHarmonizer.updateDisplay(
at imagej.legacy.plugin.LegacyPlugin.postPluginHarmonization(
at imagej.plugin.PluginManager$

Change History

comment:1 Changed 2011-07-11T14:16:57-05:00 by bdezonia

After fixing an issue with RGB data in DatasetHarmonizer (272a63e1739a422394bcbe72707d58e966e17409) I can no longer duplicate the exception.

But the lut changing is still happening. Basically the plugin sees the input data is invalid and does nothing. But the Harmonizer assumes things have changes and manipulates the ColorTables. The LUT/ColorTable code is inconsistent.

comment:2 Changed 2011-07-29T14:01:29-05:00 by bdezonia

  • Milestone changed from biweekly-2011: Jul-18 to Jul-29 to imagej-2.0-alpha5

This is another legacy color/lut issue. See also #665 and #701

comment:3 Changed 2011-08-11T13:32:08-05:00 by bdezonia

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

Fixed in 97ba2789250130ab526723082e0e3b2bc82b968f.