Weird FFT filter behaviour on first run

Hi everyone!

I recently run into a strange behaviour of the custom FFT filter when applied to a whole stack, where the filter is only applied to the first slice, regardless of indicating otherwise, but only on the first call after starting Fiji (also just plain ImageJ). Afterwards it works as expected.

This issue can be reproduced with this short macro:

// make test stack
newImage("test_stack", "8-bit black", 64, 64, 64);
run("Specify...", "width=32 height=32 x=32 y=32 slice=1 oval constrain centered");
run("Set...", "value=128 stack");
run("Select None");

// make filter (abs(x) ramp)
newImage("filter", "32-bit black", 64, 64, 1);
run("Macro...", "code=v=abs(x-32);");

// apply filter to test stack
selectWindow("test_stack");
run("Custom Filter...", "filter=filter process");

//show montage of filtered stack
run("Make Montage...", "columns=8 rows=8 scale=1 border=1");
close("test_stack");
close("filter");

To see it in action, restart Fiji, and run the macro twice. You’ll get the following -different- results:

I’m testing a macro that depends on this filter as a first step of a lengthy process, and it took me a while to figure out that the inconsistent results came from this issue and not the downstream stuff.

Perhaps @Wayne can help me out here?

Thanks a lot!
Nico

1 Like

This bug is fixed in ImageJ 1.52s, which you can upgrade to by using the Help>Update ImageJ command.

1 Like

That’s excellent news, @Wayne!

Once again, thank you very, very much for your commitment. :heart:

Nico