Login  Register

setting selection line-width from a macro

Posted by Martin Höhne on Mar 24, 2015; 3:31pm
URL: http://imagej.273.s1.nabble.com/setting-selection-line-width-from-a-macro-tp5012135.html

Dear All,

I want to convert a segmented-line into an area, and repeat this for different line witdths (of the same original segmented line). I can do this manually, but I fail doing this from a macro. Below is a macro which I thought would do this, but it fails. All created areas have the same size.
What am I missing?

Thanks
Martin

-------
run("Dot Blot (7K)");
makeLine(482,48,387,125,246,90,156,175,67,143,54,223);
roiManager("Add");

for (i=1; i<33; i=i+10) {
        roiManager("Select", 0);
        run("Line Width...", "line="+i);
        run("Line to Area");
        roiManager("Add");
}
roiManager("Show All");