Macro command setLineWidth does not work

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

Macro command setLineWidth does not work

jumpfunky
Hi,

if I try to manipulate the line width of the line selection tool using
the macro command "setLineWidth" it doesnt work. The line width does not
change.

A bug? (ImageJ 1.48p).

Cheers,
Thorsten

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Macro command setLineWidth does not work

Herbie-3
Thorsten,

perhaps you should set

        setLineWidth( widthInPixel );

_before_ actually drawing the line.

HTH

Herbie

:::::::::::::::::::::::::::::::::::::::::
On 22.01.14 11:49, Thorsten Wagner wrote:

> Hi,
>
> if I try to manipulate the line width of the line selection tool using
> the macro command "setLineWidth" it doesnt work. The line width does not
> change.
>
> A bug? (ImageJ 1.48p).
>
> Cheers,
> Thorsten
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Macro command setLineWidth does not work

jumpfunky
Hi Herbie!

Thats exacly what I've done.

But this command doesn't affect the line selection tool but just the
command "drawLine".
The command
 run("Line Width...", "line=5");  
seems to work!

Thanks,
Thorsten

Am Mittwoch, den 22.01.2014, 13:11 +0100 schrieb Herbie:

> Thorsten,
>
> perhaps you should set
>
> setLineWidth( widthInPixel );
>
> _before_ actually drawing the line.
>
> HTH
>
> Herbie
>
> :::::::::::::::::::::::::::::::::::::::::
> On 22.01.14 11:49, Thorsten Wagner wrote:
> > Hi,
> >
> > if I try to manipulate the line width of the line selection tool using
> > the macro command "setLineWidth" it doesnt work. The line width does not
> > change.
> >
> > A bug? (ImageJ 1.48p).
> >
> > Cheers,
> > Thorsten
> >
> > --
> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Macro command setLineWidth does not work

Rasband, Wayne (NIH/NIMH) [E]
In reply to this post by jumpfunky
On Jan 22, 2014, at 5:49 AM, Thorsten Wagner wrote:

> Hi,
>
> if I try to manipulate the line width of the line selection tool using
> the macro command "setLineWidth" it doesnt work. The line width does not
> change.
>
> A bug? (ImageJ 1.48p).

The setLineWidth() macro function sets the line width used by drawLine(), lineTo(), drawRect() and drawOval(). Use Roi.setStrokeWidth() to set the width of line selections. Here is an example that creates a line selection and sets its width to 25 and its color to a transparent blue.

  requires("1.48h");
  newImage("Untitled", "8-bit random", 400, 400, 1);
  makeLine(102,124,213,114,286,188,227,289);
  Roi.setStrokeWidth(25);
  Roi.setStrokeColor("550000ff");

The Roi.* macro functions, added in v1.48h, are described at:

   http://imagej.nih.gov/ij/developer/macro/functions.html#Roi

-wayne

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html