Thresholding bug Image5D

Hi all,

My first time on this forum. Such a good resource. I hope to contribute in the future…

I am trying to write a new macro and all of a sudden when I try to threshold with the “Li” algo, it gives me an error “image is not an Image5D”

the code is part of a bigger macro and other threshold methods seem to work.

I tried updating fiji to no effect…


run("Convert to Mask");

any Ideas???


Can you attach the relevant image file to this post? (or share a link via a file-sharing program such as Dropbox, etc.) Just the image that is used for that code snippet.

It is difficult for us to know the problem without testing on a dataset that is generating this issue.

Or - share the entire image and the full macro code… that would also work. Though using a minimal working example is best.


It looks like you are running the Image5D Duplicate command in your macro, when really you probably want to be running Duplicate... - including the three dots is important.

Using the search bar in Fiji, starting to type in Duplicate shows that both commands exist and also where they are found in the menus.

(My general rule of thumb, rightly or wrongly, is that whenever a search reveals two commands with similar names, the one I want is the one that doesn’t have ‘Image5D’ in it… this link suggests Image5D is from > 10 years ago, and I’d be curious to know of its current status in terms of support and usefulness)


Thanks Pete!

That was exactly what was wrong. Never noticed there were 2 commands. I hope you did not mention that anywhere in your handbook or I should walk the walk of shame…

The way around I found yesterday is to delete the 5D jar file. Bit more drastic than adding 3 full stops J.

Have a great Xmas.


1 Like

Thanks Ellen

For taking time to reply. It Seems Pete found the error as being a rooky mistake in the command used.