Login  Register

Re: Point mode and Point Tool Dialog and WaitforUser

Posted by Rasband, Wayne (NIH/NIMH) [E] on Dec 17, 2016; 12:23am
URL: http://imagej.273.s1.nabble.com/Point-mode-and-Point-Tool-Dialog-and-WaitforUser-tp5017791p5017792.html

> On Dec 16, 2016, at 4:16 PM, nstifani <[hidden email]> wrote:
>
> Hi there,
> I have read that the Point Tool dialog was non-modal. Awesome !
> /1.50d 25 October 2015
> The Edit>Options>Point Tool dialog, in multi-point mode, is now non-modal
> and has a "Counter" drop down menu. As a shortcut for opening this dialog,
> double click on the multi-point tool icon.
> /
>
> So I was trying to run something like:
> run("Point Tool...");
> waitForUser("The Point Tool Dialog prevents the waitforUser...");
>
> Yet the waitforUser wont appear unless the Point Tool Dialog is closed... Is
> there a walk-around?

This will work as expected if you insure that the multi-point tool is selected and you use doCommand("Point Tool…”) instead of run("Point Tool…”), for example:

  setTool("multipoint");
  doCommand("Point Tool...");
  waitForUser("Wait for User...”);

The doCommand() function runs a command in a separate thread and returns immediately. The run() function runs a command and waits for it to finish.

-wayne


> --
> View this message in context: http://imagej.1557.x6.nabble.com/Point-mode-and-Point-Tool-Dialog-and-WaitforUser-tp5017791.html
> Sent from the ImageJ mailing list archive at Nabble.com.

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