NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug.

The Fiji project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Bug 264 - Duplicate Image stack command fails to rename
Duplicate Image stack command fails to rename
Status: RESOLVED FIXED
Product: Fiji
Classification: Unclassified
Component: Plugins
unspecified
PC Windows
: P2 normal
Assigned To: ImageJ Bugs Mailing List
Depends on:
Blocks:
 
Reported: 2010-12-28 11:31 CST by kees jalink
Modified: 2010-12-28 12:30 CST
0 users

See Also:

Description kees jalink 2010-12-28 11:31:29 CST
In the process of migrating my macros from ImageJ to Fiji I noted a consistent crash of my macro when run in Fiji (it runs fine in ImageJ). I was able to nail it down to a difference in behaviour of the Image>duplicate command between the two programs.
When I have an 3-channel (RGB) image stack (time lapse movie) openend in IJ, lets say: "inputstack" the macro command

run("Duplicate...", "title=DrawOverlay duplicate channels=1-3 slices=1-400");

will duplicate the stack AND RENAME the copy to "DrawOverlay". (my macro uses that name).

In Fiji, the duplicate works fine BUT it will name it "inputstack-1" rather than "DrawOverlay". 
Note that for single images, and for simple image stacks (without the 3 channels) the rename command works fine in Fiji. Also note that the direct command (so, not called from a macro) also shows this erroneous behaviour.

I think it is a bug, or at least a difference in behaviour between IJ and Fiji that makes the macros incompatible.

Best regards, Kees Jalink
Comment 1 Johannes Schindelin 2010-12-28 12:30:20 CST
For future reference: since you are proficient in macro programming, it would be good to provide a macro for reproducing the bug, e.g.

-- snip --
run("Fly Brain (1MB)");
run("Make Composite");
run("Duplicate...", "title=other-label duplicate channels=1-3 slices=1-57");
-- snap --

I also have to admit that I am unsure what ImageJ version you tested with: the current one still has the bug. In line 257 of the Duplicator class, it should say "setTitle(title)" instead of "setTitle(newTitle)": http://imagej.nih.gov/ij/developer/source/ij/plugin/Duplicator.java.html#257

The issue is fixed in ImageJA now, and uploaded to the updater (please test).