Interacting with image in BatchMode

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

Interacting with image in BatchMode

Thomas P
I'm in the middle of writing an automated red eye removal macro for a school project. A part of the program marks the located red eyes so the user can deselect false positives so they are not processed.

When I run the macro in Batchmode the image showing the detected red eyes are not shown, so the concept fall apart a bit. Is there a command that forces a window to apear even when batchmode is active?

On a different note - Is it possible to close the ROI manager window in a macro? selectWindow() doesn't seem to work on the ROI manager...

Thanks in advance

Thomas
Reply | Threaded
Open this post in threaded view
|

Re: Interacting with image in BatchMode

Volker Baecker
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,
you can switch the batchmode off temporarily to allow user interaction
and switch it on again afterwards. For example

setBatchMode(false);
waitForUser("Correct the selection and press ok");
setBatchMode(true);

I don't know if it is directly possible in the macro language, but you
can do it running javascript from the macro language:

eval("script", "RoiManager.getInstance().close();");

Volker

On 16/06/10 14:19, Thomas P wrote:

> I'm in the middle of writing an automated red eye removal macro for a school
> project. A part of the program marks the located red eyes so the user can
> deselect false positives so they are not processed.
>
> When I run the macro in Batchmode the image showing the detected red eyes
> are not shown, so the concept fall apart a bit. Is there a command that
> forces a window to apear even when batchmode is active?
>
> On a different note - Is it possible to close the ROI manager window in a
> macro? selectWindow() doesn't seem to work on the ROI manager...
>
> Thanks in advance
>
> Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwYyokACgkQ0gXPLVKexCch0gCdGZJOuhXNJzLXZEW5/X6QihyZ
vfoAniypLaDmVBkGST9p7YR+ENF3ohGZ
=SP/F
-----END PGP SIGNATURE-----

--
passerelle antivirus du campus CNRS de Montpellier
--
Reply | Threaded
Open this post in threaded view
|

Re: Interacting with image in BatchMode

Thomas P
Thanks for the quick response. The reason why I haven't been doing as you said is partly that the documentation states that setBatchMode(true) should only be called once in each macro, and partly because the instance where user interaction is required is inside a function.

When I set BatchMode to false around the part where user interaction is required it seems as if all but the selected windows are closed (or removed from memory as they have never been open in batch mode) as the subsequent calls to other imageID returns an error - any way to fix this?

Thanks for the suggestion for the ROI manager. I will check it out though it is outside the scope of my course...
Reply | Threaded
Open this post in threaded view
|

Re: Interacting with image in BatchMode

dpoburko
setBatchMode(false) won't show any images that were created while in
Batch mode. But setBatchMode("exit and display") will probably let you
do what you want.

Cheers,
Damon

On 6/16/2010 6:38 AM, Thomas P wrote:

> Thanks for the quick response. The reason why I haven't been doing as you
> said is partly that the documentation states that setBatchMode(true) should
> only be called once in each macro, and partly because the instance where
> user interaction is required is inside a function.
>
> When I set BatchMode to false around the part where user interaction is
> required it seems as if all but the selected windows are closed (or removed
> from memory as they have never been open in batch mode) as the subsequent
> calls to other imageID returns an error - any way to fix this?
>
> Thanks for the suggestion for the ROI manager. I will check it out though it
> is outside the scope of my course...
>