FW: Macro function setLineWidth does not work properly with overlays

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

FW: Macro function setLineWidth does not work properly with overlays

AAM71

Dear Listers,

Recently I have found that macro function setLineWidth() does not work properly with overlays if I try to use value "1". In this case it reverts to line width set by double clicking on "Straight Line". If value is anything apart 1 then setLineWidth() works fine with Overlay.drawLine().

I am attaching the macro demonstrating the effect with Overlay.drawLine() in comparison with drawLine(). To see the effect, please, set first default line width (by double clicking on "Straight Line") to 1 and then to bigger number.




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

setLineWidth_example_.txt (894 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: FW: Macro function setLineWidth does not work properly with overlays

AAM71
Dear Listers,

Should I report it as a bug? Any suggestions to resolve this? My several
macros depend on setting line width for Overlays.

Sincerely,

Alex Mironov


On 29/10/2018 21:40, Aleksandr Mironov wrote:

> Dear Listers,
>
> Recently I have found that macro function setLineWidth() does not work properly with overlays if I try to use value "1". In this case it reverts to line width set by double clicking on "Straight Line". If value is anything apart 1 then setLineWidth() works fine with Overlay.drawLine().
>
> I am attaching the macro demonstrating the effect with Overlay.drawLine() in comparison with drawLine(). To see the effect, please, set first default line width (by double clicking on "Straight Line") to 1 and then to bigger number.
>
>
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
Dr. Aleksandr Mironov MD, PhD
Senior Experimental Officer
D.1527, M.Smith Building
EM Core Facility
School of Biological Sciences,
Faculty of Biology Medicine and Health
University of Manchester
Oxford Road
Manchester
M13 9PT
UK

Tel. +44-(0)161-275-5645
E-mail: [hidden email]
https://www.bmh.manchester.ac.uk/research/facilities/electron-microscopy/

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

Re: Macro function setLineWidth does not work properly with overlays

Wayne Rasband-2
In reply to this post by AAM71
> On Oct 29, 2018, at 5:40 PM, Aleksandr Mironov <[hidden email]> wrote:
>
>
> Dear Listers,
>
> Recently I have found that macro function setLineWidth() does not work properly with overlays if I try to use value "1". In this case it reverts to line width set by double clicking on "Straight Line". If value is anything apart 1 then setLineWidth() works fine with Overlay.drawLine().
>
> I am attaching the macro demonstrating the effect with Overlay.drawLine() in comparison with drawLine(). To see the effect, please, set first default line width (by double clicking on "Straight Line") to 1 and then to bigger number.

This bug is fixed in the latest ImageJ daily build (1.52i22). A macro that reproduces the problem is below.

-wayne


newImage("Untitled", "RGB ramp", 512, 512, 1);
setColor("red");
setLineWidth(0);
Overlay.drawLine(0, 50, 512, 50);
Overlay.add;
setLineWidth(1);
Overlay.drawLine(0, 100, 512, 100);
Overlay.add;
setLineWidth(2);
Overlay.drawLine(0, 150, 512, 150);
Overlay.add;
setLineWidth(4);
Overlay.drawLine(0, 200, 512, 200);
Overlay.add;
Overlay.show;

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