Login  Register

Re: run() function call for "Straight Line Tool"

Posted by Wayne Rasband-2 on Oct 31, 2018; 1:11am
URL: http://imagej.273.s1.nabble.com/run-function-call-for-Straight-Line-Tool-tp5021375p5021381.html

> On Oct 30, 2018, at 11:46 AM, Aleksandr Mironov <[hidden email]> wrote:
>
> Dear Listers,
>
> I have tried to use Macro Record function to generate run() function call for "Straight Line Tool" but failed. Recorder window does not reflect anything when I try double click "Straight Line Tool" to get second argument for this ImageJ menu command.

Selection tools like the Straight Line Tool are recorded when they are used to create a selection. For example, use the Straight Line Tool to create a line selection and a line like

   makeLine(150, 150, 350, 230);

is recorded. Look up makeLine() at

   https://imagej.nih.gov/ij/developer/macro/functions.html

and you will see it has an optional 5th argument (line width) that is not recorded. You can also look up built in functions like makeLine() by using the Function Finder (shift+ctrl+F) in macro editor windows.

-wayne

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html