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

Opened 2011-07-20T15:01:14-05:00

Last modified 2011-08-02T10:52:28-05:00

Split Channels sometimes complains

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


Split Channels command sometimes runs and sometimes complains that it needs a multichannel image.

Open Neuron sample (multi channel) and it runs fine.

Create a new 4 channel Hypertack and it complains.

Change History

comment:1 Changed 2011-07-20T15:10:10-05:00 by bdezonia

RGBStackSplitter in IJ1 works on CompositeImages and RGB Imagepluses. I think our legacy translation is not creating a CompositeImage from the New HyperStack command. And since the image is not RGB it complains.

comment:2 Changed 2011-07-20T15:13:47-05:00 by bdezonia

Even using Edit Colors to choose CompositeMode does not affect IJ1.

comment:3 Changed 2011-07-20T15:41:42-05:00 by bdezonia

Testing in IJ1. Split channels always works for new Hyperstacks with C > 1. Regardless of how color mode is set (color, gray, compos).

comment:4 Changed 2011-07-20T15:42:25-05:00 by bdezonia

  • Summary changed from Split CHannels sometimes complains to Split Channels sometimes complains

comment:5 Changed 2011-07-29T14:04:48-05:00 by bdezonia

  • Milestone changed from biweekly-2011: Jul-18 to Jul-29 to biweekly-2011: Aug-01 to Aug-12

comment:6 Changed 2011-07-29T15:28:34-05:00 by bdezonia

Yes, the New Hyperstack command returns a 4 channel ImagePlus and not a CompositeImage. RGBStackSPlitter does not work on this kind of data.

How does IJ1 succeed here?

comment:7 Changed 2011-07-29T15:31:34-05:00 by bdezonia

It's a problem with New Hyperstack. In IJ1 it returns a CompositeImage. Called from IJ2 it does not. Investigating.

comment:8 Changed 2011-07-29T15:43:49-05:00 by bdezonia

IJ1 calls HyperStackMaker macro to create the hyperstack. Our macro support must be broken a little. Dialog UI looks fine so not sure why mode not getting set.

This bug has brought to my attention a whole list of macros shipped with IJ.jar that we need to test for compatibility.

comment:9 Changed 2011-08-01T12:10:32-05:00 by curtis

  • Milestone changed from biweekly-2011: Aug-01 to Aug-12 to imagej-2.0-alpha5

Milestone biweekly-2011: Aug-01 to Aug-12 deleted

comment:10 Changed 2011-08-01T13:55:49-05:00 by bdezonia

Since a macro is running and no IJ1 window is present and imp.hide() terminate early without dealing with ImageWindow::close() and ImageWindow::show(). Thus created CompositeImage is not getting registered with legacy layer. Need to intercept calls to ImagePlus::show() and ImagePlus::hide() and register them with legacy layer.

comment:11 Changed 2011-08-02T10:52:28-05:00 by bdezonia

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

fixed in 736c97c545241fbd8189b087c2d218654d3e7bc1 and 1bb5eda8dfb913b778042b74b594be46f18d6274. Made LegacyInjector track ImagePlus show() and hide().