Use getProfile on ROI lines specifying line width



Dear All,

For bunch of lines saved as a separated entry in the ROI manager, is there a way to get profile of a thicker line. e.g. instead of 1 pix to get profile of the 5pix width line using IJ Macro language?

How to draw a curved line in ImageJ and move it for certain pixels? Can I also make a selection of the area in between the two lines?

You mean as in

run("Blobs (25K)");
run("Line Width...", "line=50");
makeLine(22, 19, 152, 146);
run("Line Width...", "line=1");
makeLine(90, 191, 188, 191);

where the second line and the line=1 is just to show that the roiManager select works.


Thanks eljonco,

But I was rather thinking how to automatically change the lines that I have in ROI manager from 1pix width to let’s say 5 pix width or so. Or alternatively, force the getProfile to "profile"along thicker line.


you mean (replace the blobs part with generating your own rois and then loop over these rois in the roi manager)

run("Blobs (25K)"); //prepare reproducible setting
run("Line Width...", "line=1");
makeLine(22, 19, 152, 146);
run("Line Width...", "line=50");
//from here on loop over the rois in the manager
getSelectionCoordinates(x, y);//x and y are arrays [0..1] containing coordinates x and y
run("Measure");//and obtain measurements for every roi


This will do the job!

Thanks a ton!!!