LUT inversion creates window in batch mode

ridge-detection
macro
Tags: #<Tag:0x00007fd542873790> #<Tag:0x00007fd542873628>

#1

Hello,
I’ve written 3 macros (macro1, macro2, macro3) [github repo] (https://github.com/petersoapes/IJmacro_repo/blob/master/README.md). My goal is to have them run in batch mode, so I have
setBatchMode("hide");
in all three so that they can be run over a large number of images. This hides the image windows but shows the Log window, (which works fine with me).

My issue is that when I use the function to invert the LUT before running Ridge detection (in macro2 and macro3), these 2 functions create windows that I need to “OK” before the macros will continue. Is am I missing an obvious way to automatically run these functions:

run("Invert LUT");
run("Ridge Detection", "line_width=2 high_contrast=255 low_contrast=240 extend_line show_junction_points show_ids displayresults add_to_manager method_for_overlap_resolution=SLOPE sigma=1.2 lower_threshold=16.83 upper_threshold=40");

Without having to click the OK button to continue my macro?

Thanks!


#2

@petersoapes

Is this the message that is popping up for you regarding the LUT:

If so… are you sure you need that extra run("Invert LUT"); call in your code before the Ridge Detection? Try removing it… does the analysis proceed as you need without the pop-up window?

eta


#3

Thanks @etarena, that did seem to do the trick.
Now a Junction window appears that wasn’t there before, but I don’t need to click to continue the process.

From my experience working with Ridge Detection I thought that this LUT inversion was required. Is this not true if the batch mode is hidden?


#4

@petersoapes

I’m glad that helped!

Now that is a question for @twagner … because I honestly don’t know.

eta :slight_smile:


#5

@petersoapes
Ridge detection should work independently from the LUT. However, it expect bright lines on dark background. If the LUT is inverted, this can be misleading because you see dark lines on bright background but don’t have to check the ''Dark line" option.

Hope this helps.

Best,
Thorsten