Login  Register

Re: Measure intensities *on* rather than within an ROI line, and be able to specify the "line" width.

Posted by Lim Soon Yew on Aug 04, 2011; 3:23am
URL: http://imagej.273.s1.nabble.com/Measure-intensities-on-rather-than-within-an-ROI-line-and-be-able-to-specify-the-line-width-tp3683556p3683557.html

Hi Emmanuel,

You can try the macro I wrote below:

p=2; //1-n Call ROI from ROI manager
l=5; //Line width for line profile
roiManager("Select", p-1); //index starts at 0)
//Extract points in ROI
getSelectionCoordinates(xCoordinates, yCoordinates);
makeSelection("polyline",xCoordinates, yCoordinates);
run("Line Width...", "line=l");
run("Plot Profile");

Best Regards,
John
________________________________________
From: ImageJ Interest Group [[hidden email]] On Behalf Of Emmanuel Levy [[hidden email]]
Sent: Wednesday, August 03, 2011 10:24 PM
To: [hidden email]
Subject: Measure intensities *on* rather than within an ROI line, and be able to specify the "line" width.

Hi,

I would like to measure pixel intensities along the border of
particles (cell membranes). In my macro each particle has a
corresponding ROI. That would be equivalent to being able to measure
the intensity *on* (and not within the ROI line), and be able to
specify the line width (e.g., 3-15 pixels).

In principle this looks simple but I'm not sure what would be the best
way to achieve it. The simplest (and very rough) way I thought of was
to run every measure twice, one on the "dilated" particles and one on
the "eroded" same particles. However, it's not optimal if I want to
get measures for different widths simultaneously (e.g., 3,5,7,9,11,13
and 15 pixels "ribbon" width).

Thanks for any advice you could give!
Best,

Emmanuel