set ROI line width in macro?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

set ROI line width in macro?

Michael Doube-2
Dear List

Does anyone know of a way to set the width of straight line selections
from a macro?

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.

Thanks

Mike

--
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
Reply | Threaded
Open this post in threaded view
|

Re: set ROI line width in macro?

Wayne Rasband
> 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
Reply | Threaded
Open this post in threaded view
|

Re: set ROI line width in macro?

Michael Doube-2
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