Re: setLineWidth question

Posted by Rasband, Wayne (NIH/NIMH) [E] on
URL: http://imagej.273.s1.nabble.com/setLineWidth-question-tp3686294p3686295.html

On Dec 5, 2010, at 12:56 PM, Cammer, Michael wrote:

> Dear Imagers,
>
> We want to measure the intensities along the edges of a circle, polygon, or freehand drawn or extracted ROI.  Getting the edge coordinates appears to work fine.  However, when we try to change the linewidth (code below), it doesn't change from the value set by doubleclicking on the line tool and setting it there.  Is there a different command we should be using?  (Also, doublclicking on the line tool and entering a value is not recorded in the Recorder window.)  We are using v1.44j and 1.44k with 32 bit Java 1.6.0_10 on a Vista PC.
>
>  linewidth = 5;
>  setLineWidth(linewidth);
>  makeSelection("freeline", xCoords, yCoords);
>  run("Plot Profile");
>
> or
>
>  linewidth = 5;
>  makeSelection("freeline", xCoords, yCoords);
>  setLineWidth(linewidth);
>  run("Plot Profile");

Use the the Edit>Options>Line Width command to set the line width used by Analyze>Plot Profile. The Line Width command records as

    run("Line Width...", "line=5");

The setLineWidth() macro function specifies the line width used by drawLine(), lineTo(), drawRect() and drawOval().

-wayne