Use getProfile on ROI lines specifying line width

imagej

#1

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?
#2

You mean as in

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

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


#3

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.


#4

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("Measure");
roiManager("Add");
run("Line Width...", "line=50");
//from here on loop over the rois in the manager
roiManager("Select",0);
getSelectionCoordinates(x, y);//x and y are arrays [0..1] containing coordinates x and y
x0=x[0];x1=x[1];y0=y[0];y1=y[1];
makeLine(x0,y0,x1,x1);
run("Measure");//and obtain measurements for every roi

#5

This will do the job!

Thanks a ton!!!