Login  Register

Re: Strange side effect of drawDot()

Posted by Rasband, Wayne (NIH/NIMH) [E] on Jun 05, 2016; 10:52pm
URL: http://imagej.273.s1.nabble.com/Strange-side-effect-of-drawDot-tp5016592p5016594.html

> On Jun 5, 2016, at 3:24 PM, Burger Wilhelm <[hidden email]> wrote:
>
> Hello list,
>
> I encountered a strange problem with ImageProcessor's drawDot() method which I am unable to track down. After invoking drawDot() the subsequent call to flipVertical() has no effect, as illustrated in the plugin below (running IJ 1.51a). Mysterious bug?

This bug is fixed in the latest ImageJ daily build (1.51b29). DrawDot() was creating a 1x1 ROI which flipVertical() was constrained to use.

-wayne

> //-------------------------------------------------------
> import java.awt.Color;
> import ij.ImagePlus;
> import ij.plugin.filter.PlugInFilter;
> import ij.process.ImageProcessor;
>
> public class Draw_Dot_Test implements PlugInFilter {
>
> public int setup(String arg, ImagePlus imp) {
> return DOES_ALL;
> }
>
> public void run(ImageProcessor ip) {
> ip.drawDot(0, 0);
> ip.flipVertical(); // has no effect after drawDot()!
> }
> }
> //-------------------------------------------------------

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