Getprofile() vertical ignored with macro language?

Hi all
I have some trouble with the getprofile() instruction when i want to use it with a vertical profile. Only one value is stored in my array. I use : run(“Profile Plot Options…” vertical but the command seems to be ignored.
Have you an idea about my problem.
Thanks
Alexandre.

Welcome to the forum, @Spline!

In the user interface, you have to press Alt-K to get a vertical profile of a rectangular ROI. In the macro language, you can simulate the Alt key using:

setKeyDown("alt");

See also this example macro: http://imagej.net/macros/GetProfileExample.txt

The macro recorder will also record this when pressing Alt-K:

setKeyDown("alt"); run("Plot Profile");
2 Likes