Search code examples
imagejfiji

How to do a line selection in fiji (imagej) using specified coords


How to select a line in an image using ImageJ/Fiji by setting its start and end points? As in not drawing it over the image, but inputting the coordinates directly somewhere.


Solution

  • open script editor, select IJ1 macro and then type the code below and then run.

    makeLine(1, 1, 100, 100);
    

    This will create a line ROI between (1,1) and (100, 100).

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