Macro using Photo monitoring is giving me errors

I am using a 8 bands multispectral image coming from Cessna acquisition. Google drive link here:
https://drive.google.com/file/d/1J7QxwtlZkWADgbbjMCGHu_T0oM42tmrO/view?usp=sharing
Ask me for access.
I am importing as an hyperstack bands 2, 3 and 4 (Green, Red and NIR), turning it into an RGB image (false color) so I can use photo monitoring tool to create NDVI from RED and NIR bands. I can do it manually. But my goal is to use the macro to do it.
When I record I get this output:

run(“Bio-Formats Importer”,“open=”+thermal_path +" color_mode=Default rois_import=[ROI manager] specify_range view=[Hyperstack] stack_order=Default c_begin=2 c_end=4 c_step=1");
run(“Enhance Contrast”, “saturated=0.35”);
rename(“temp_1”);
run(“Stack to RGB”);
rename(“for_NDVI”);
run(“Single image index processing from displayed image”, " select=[NDVI: (NIR-Vis)/(NIR+Vis)] display minimum=-0.50 maximum=0.80 saturation=2 channel=green channel_0=blue select_0=NDVI_VGYRM.lut");

But when running the macro I get a java error message. Exception.txt (2.0 KB)
Anyone has any suggestion on making the last step of this macro work.
Thanks

Hi,

Could you paste the macro itself, not just the recording, please?

Also, where do you get “Single image index processing from displayed image”? Which function do you use to get this record?

Thanks

M.

I see that you are using the Photomonitoring plugin (GitHub - nedhorning/PhotoMonitoringPlugin). @nedhorning is probably better at helping you there but the ReadMe file associated with this plugin says:

Note that the latest version of Fiji is not compatible with these plugins. It is suggested that you use the “Fiji Life-Line version, 2014 November 25” version of Fiji available from the Fiji website: http://fiji.sc/Downloads. You can also download complete Fiji/ImageJ/Photomonitoring Plugin packages by finding the appropriate package in the “downloads” directory of this Google Drive directory: packages - Google Drive. These packages contain a version of Fiji that works with the plugins and it has the plugin and associated file already installed.

Your error message indicates that you are using the latest version of Fiji. It may be worth trying an older version.

Sincerely,

M.

It is from photo monitoring plugin the function is called just as it is called in the macro “Single image index processing from displayed image”.

Like I said, the function works fine outside the macro. so I’m guessing that is not the issue. but I will give it a try and report back.
my full macro is:

pathString = getArgument;

function get(arr, index) {
for (i=0; i< arr.length; i++) {
if (i==index) return arr[i];
}
return -1;
}

paths = split(pathString, " ");

thermal_path = get(paths, 0);
run(“Bio-Formats Importer”,“open=”+thermal_path +" color_mode=Default rois_import=[ROI manager] specify_range view=[Hyperstack] stack_order=Default c_begin=2 c_end=4 c_step=1");
run(“Enhance Contrast”, “saturated=0.35”);
rename(“temp_1”);
run(“Stack to RGB”);
rename(“for_NDVI”);
run(“Single image index processing from displayed image”, " select=[NDVI: (NIR-Vis)/(NIR+Vis)] display minimum=-0.50 maximum=0.80 saturation=2 channel=green channel_0=blue select_0=NDVI_VGYRM.lut");
selectWindow(“temp_1”);
close();