Login  Register

Re: Use of Image Sequence in macros is broken since 1.53d

Posted by Wayne Rasband-2 on Sep 13, 2020; 12:10am
URL: http://imagej.273.s1.nabble.com/Use-of-Image-Sequence-in-macros-is-broken-since-1-53d-tp5023928p5023930.html

> On Sep 12, 2020, at 5:38 AM, Stein Rørvik <[hidden email]> wrote:
>
> I see from the changelog that some changes have been done to Image Sequence to allow drag-and-drop.
> These changes has caused the use of Image Sequence in macros to be severely broken since 1.53d.

This regression is fixed in ImageJ 1.53e, now available via the Help>Update ImageJ command.

-wayne

>
> See the below demo macro to reproduce the problem.
> I am trying this with daily build 1.53e with Java 8 on Windows 10/64 but the problem is also present in 1.53d.
>
> It seems that the problem is simply that the previously available options were removed from the new dialog.
> But instead of warning the user that the functionality was removed, it is just silently ignored, giving the wrong results.
>
> So, can the previously available options be migrated to the new dialog?
> Or can the new dialog be renamed to something else, restoring the old one, so that existing macros will work?
>
> My workflow completely depends on the ability to open virtual stacks with specified slice spacing as I work with very large stacks (16GB to 64GB) so always needing to open all slices in memory is not an alternative, especially not over a slow network or when working on a computer with less than 128GB of RAM.
>
> Stein
> -----------------------
>
> dir = "C:/Users/steinr/Temp/";
> path1 = dir + "t1-head/";
> path2 = dir + "t1-rendering/";
> File.makeDirectory(path1);
> File.makeDirectory(path2);
> run("Close All");
>
> //create two example dirs with image sequences
> run("T1 Head (16-bits)");
> run("Image Sequence... ", "format=TIFF save="+dir+"t1-head/");
> run("T1 Head Renderings");
> run("Image Sequence... ", "format=TIFF save="+dir+"t1-rendering/");
>
> //load generated folders as image stacks using some of the available options
>
> //open 25 slices at 50% size:
> run("Image Sequence...", "open=&path1 starting=5 increment=5 scale=50 sort");
> //1.53c and before: options works as expected
> //1.53d and after: options are silently ignored giving the wrong results
>
> //open 12 slices virtual:
> run("Image Sequence...", "open=&path2 increment=3 sort use");
> //1.53c and before: options works as expected
> //1.53d and after: options are silently ignored giving the wrong results
>
> //re-open path1
> run("Image Sequence...", "open=&path1 file=.tif sort use");
> //1.53c and before: path1 (t1-head) was opened as requested
> //1.53d and after: path2 (t1-rendering) was silently opened instead of path1; I don't understand why
>
> //trying a wrong path
> path3 = "X:/some/non/existant/path/";
> run("Image Sequence...", "open=&path3 file=.tif sort use");
> //1.53c and before: macro exits with an error message
> //1.53d and after: t1-rendering was silently opened instead of giving an error message
>
> run("Tile");

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html