Login  Register

Re: makePoint() to remove points from list

Posted by Rasband, Wayne (NIH/NIMH) [E] on Apr 25, 2011; 1:00am
URL: http://imagej.273.s1.nabble.com/makePoint-to-remove-points-from-list-tp3684857p3684858.html

On Apr 20, 2011, at 8:54 AM, Thomas Eschner wrote:

> Hello,
>
> In a macro, I use
> setKeyDown("shift"); makePoint(xact, yact); setKeyDown("none");
> to add points to a multi-point selection. That works well.
> When I try to remove a particular point by
> if (selectionContains(xact, yact)) {
>  setKeyDown("alt"); makePoint(xact, yact); setKeyDown("none");
> }
> this very point is not removed, but all others instead.
> When I use that function directly from the multi-point selections menu, Alt-click does what it is supposed to do, i.e. removes the clicked-on point.

This bug is fixed in the 1.45g1 daily build. There is an example macro at

    http://imagej.nih.gov/ij/macros/examples/MakePointDemo.txt

-wayne