Login  Register

Re: set ROI line width in macro?

Posted by Michael Doube-2 on Nov 10, 2005; 6:10pm
URL: http://imagej.273.s1.nabble.com/set-ROI-line-width-in-macro-tp3704497p3704499.html

Thanks Wayne,

That works, only there has to be a line present, so I had to write it
like this:
----------------------------
res=getHeight();

makeLine(512,512,612,512);

if (res==1024)
    run("Line Width...", "line=25");
else if (res==2048)
    run("Line Width...", "line=50");
else
    run("Line Width...", "line=1");
------------------------

Mike


Wayne Rasband wrote:

>> Does anyone know of a way to set the width of straight
>> line selections from a macro?
>
>
> Try recording the Edit>Options>Line Width command.
>
>> I have images in 2 resolutions (1024 and 2048), and I want
>> the width to automatically be the same (in microns), so some
>> lines have to be twice as wide as others.
>
>
> -wayne


--
Michael Doube  BPhil BVSc MRCVS
MPhil / PhD Student
Dental Institute
Barts and The London School of Medicine and Dentistry
Queen Mary, University of London
New Rd
London  E1 1BB
United Kingdom

Phone +44 (0)20 7377 7000 ext 2681