Temporal-color code bug

Hi,

Since my latest round of ImageJ updates I can no longer successfully run the Temporal-Color Code command.
Every time I try to run the command on a simple stack it results in an error:

ERROR:

Aray expected in line 249
(called from line 52)

Dialog . addChoice ("LUT", <lutA> ) ;

LOG:

TypeError: [object JavaPackage] is not a Java class in nashorn:mozilla_compat.js at line number 373 at column number 16

DEBUG WINDOW:

FIJI INFO:
image

Hello

I can indeed reproduce this error. In the code of the Temporal-Color_Code.ijm there is this strange function called makeLUTsArray() at line 140 that does some nicely convoluted things…

What you can do as a temporary workaround is to replace that whole function (lines 140 to lines 175) with this

function makeLUTsArray() {
	luts = getList("LUTs");
	return luts;
}

Then it should work

You can find the macro for the temporal color code at the following location from your Fiji install folder
Fiji.app/plugins/Scripts/Image/Hyperstacks

9 Likes

Thank you very much for the fast reply.
Replacing the code indeed seems to solve the issue.

1 Like

You’re welcome.

I added this as a pull request. Don’t see how this change could break old functionality.

Thanks!

I had this bug in Windows but not in MacOS. I changed the Temporal-color-code macro as suggested and it solved the issue. Any clue why the original code worked in Mac but not in Windows? Something to do with Java?

Just for notifying the updates in this thread. Thanks to @oburri !

2 Likes

I still get an error "Array expected in line 181 (called from line 51)
Dialog. addChoice(“LUT”, ), even after updating.

Hi Xavi,

I’m giving this file to my students until it’s fixed:

The current Fiji Temporal projection command does not work.  A solution has been proposed by O.Burry on the Image Analysis forum (https://forum.image.sc/t/temporal-color-code-bug/41323/2).
The file “Temporal_Color_Code2.ijm” needs to be placed in your Fiji at this location:
Fiji.app>Plugins>Scripts>Image>Hyperstacks

From here on, if you have a stack and go to Image>Hyperstack>Temporal Color Code2 should give you the result you want.

Temporal-Color_Code2.ijm (4.8 KB)