Fiji and Mexican Hat

I want to do image analysis of vascular bed using Fiji and Mexican Hat app. When i ran the program, I got this error message. Can anyone help fix this? Thanks!

Memory * 370MB of 5930MB (6%)
nImages() * 2
getTitle() * “Binary-AK_88_LE_projection_1-5 10-18-2019_Cycle_C001T001.jpg (green)”
base * “AK_88_LE_projection_1-5 10-18-2019_Cycle_C001T001.jpg”
directory * “C:\Users\zmcbride\Documents\CONFOCAL DATA\AK_88_LE_projection_1-5 10-18-2019_Cyc…”
binary * “Binary-AK_88_LE_projection_1-5 10-18-2019_Cycle_C001T001.jpg”

Error: Unrecognized command: “Mexican Hat Filter” in line 38:
run ( “Mexican Hat Filter” , “radius=10” <)> ;

Hello Zeljka -

The Mexican Hat Filter is a plugin that works with ImageJ, but
does not ship with Fiji / ImageJ. Therefore you have to install it.

Download the class file Mexican_Hat_Filter.class and copy it
to the plugins directory of your Fiji / ImageJ installation (and
restart Fiji).

You should now see that it’s available from the Fiji menu bar:
Plugins > Mexican Hat Filter. You can run it using
this menu-bar entry, but you can also run it from an IJM macro
using the line of code cited in your error message:

run ("Mexican Hat Filter", "radius=10");

Thanks, mm


Thank you for your response. I did install the “Mexican hat” plugin ahead of time, and restarted the Fiji after that few times. But, when I tried to run the image analysis program I got this error message.

Hello Zeljka -

Could you first check that Mexican Hat Filter does
appear as a menu entry when you click on Plugins in
the Fiji menu bar?

(If not, make sure that you did copy the .class file,
“Mexican_Hat_Filter.class”, to your plugins directory.)

This works for me (using Fiji 2.0.0-rc-69/1.52r55). Here
is a complete, runnable* IJ Macro script:

print (IJ.getFullVersion());
run ("Blobs (25K)");
run ("Mexican Hat Filter", "radius=10");

(It applies the Mexican-Hat filter to the “Blobs” sample image.)

Try pasting this script into the script editor, and see if it runs
for you. (Set the language to “IJ1 Macro”.)

If you still can’t get things working, could you trim down your
“image analysis program” to the smallest (runnable) version
that reproduces your issue, and post it?

(When you post it, please post it in a “code block” delimited
by three backticks, “```”, so that browsers won’t “helpfully”
change the quote characters used for strings.)

*) Runnable, of course, provided Mexican Hat Filter
is installed.

Thanks, mm