Use of makePoint(x,y) with shift modifier in a macro ?

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

Use of makePoint(x,y) with shift modifier in a macro ?

lechristophe
Dear all,

The latest ImageJ 1.41h added the makePoint(x,y) macro function to add
a point selection (note : this is reported as addPoint(x,y) in the
changelog but it is an error, I think). I would like to add a point to
an ensemble of points trough a macro, but the shift key modifier does
not seem to work with makePoint. If you try this :

newImage("test", "8-bit Black", 128, 128, 1);
makePoint(10,10);
setKeyDown("shift");
makePoint(100,100);

You only get a one-point ROI, not a two point-ROI. Would it be
possible to get the possibility to add a point to an already existing
multi-point ROI trough a macro ?

Thanks a lot,

Christophe Leterrier
Reply | Threaded
Open this post in threaded view
|

Re: Use of makePoint(x,y) with shift modifier in a macro ?

Wayne Rasband
> The latest ImageJ 1.41h added the makePoint(x,y) macro function to add
> a point selection (note : this is reported as addPoint(x,y) in the
> changelog but it is an error, I think). I would like to add a point to
> an ensemble of points trough a macro, but the shift key modifier does
> not seem to work with makePoint. If you try this :
>
> newImage("test", "8-bit Black", 128, 128, 1);
> makePoint(10,10);
> setKeyDown("shift");
> makePoint(100,100);
>
> You only get a one-point ROI, not a two point-ROI. Would it be
> possible to get the possibility to add a point to an already existing
> multi-point ROI trough a macro ?

In the v1.41i daily build a macro can add a point to an existing point
selection using

     setKeyDown("shift");
     makePoint(x, y);

V1.41i also adds the Edit>Selection>Straighten command for
straightening curved objects. Unlike the Straighten plugin, it works
with 16-bit and RGB images, and it can be used in macros.

-wayne