How to "Hide ImageJ" during macro execution?

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

How to "Hide ImageJ" during macro execution?

vischer
Hello All,

I would like to use menu command:
   ImageJ>Hide ImageJ
(on the Mac) to perform longish image processing invisibly, and avoid that clicking accidentally into an image, or pressing a  key that switches to a different hyperstack channel, disturbs the macro operation.

However, whenever ImageJ opens a new window (see macro), it returns to visibility.
The current behaviour appears not logical to me. I only could work-around by setting everything into batch mode (not practical) or to switch to a different "Space" (not practical either).
Ideally, after processing I would tell ImageJ to return to visibility and show "Processing finished".

//open an image every 2 sec:
for (jj = 1; jj <=10; jj++){
        newImage("ABC"+jj, "8-bit random", 400, 400, 2);
        wait(2000);
        close;
}


Norbert Vischer

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: How to "Hide ImageJ" during macro execution?

ctrueden
Hi Norbert,

> I only could work-around by setting everything into batch mode (not
> practical)
...
> Ideally, after processing I would tell ImageJ to return to visibility
> and show "Processing finished".

Isn't that exactly what batch mode is for? Why is batch mode "not
practical"?

Regards,
Curtis


On Tue, Jan 14, 2014 at 3:24 PM, Norbert Vischer <[hidden email]>wrote:

> Hello All,
>
> I would like to use menu command:
>    ImageJ>Hide ImageJ
> (on the Mac) to perform longish image processing invisibly, and avoid that
> clicking accidentally into an image, or pressing a  key that switches to a
> different hyperstack channel, disturbs the macro operation.
>
> However, whenever ImageJ opens a new window (see macro), it returns to
> visibility.
> The current behaviour appears not logical to me. I only could work-around
> by setting everything into batch mode (not practical) or to switch to a
> different "Space" (not practical either).
> Ideally, after processing I would tell ImageJ to return to visibility and
> show "Processing finished".
>
> //open an image every 2 sec:
> for (jj = 1; jj <=10; jj++){
>         newImage("ABC"+jj, "8-bit random", 400, 400, 2);
>         wait(2000);
>         close;
> }
>
>
> Norbert Vischer
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: How to "Hide ImageJ" during macro execution?

vischer
Hi Curtis,

when designing macros, I carefully think about what should be visible on the screen. Then, the user can follow and understand what is being done, which particles are rejected and why, how montages or graphics are gradually built. For this, Wayne fortunately implemented in the last few weeks setBatchMode("show/hide"), and a selection-sensitive Image>Zoom>Set. Now I can control exactly what is being displayed, and hide flickering temporary windows.
The user usually observes the start of the process, and once everything looks promising, he can do other things in other applications, and he can occasionally look  how far ImageJ has proceeded meanwhile.
To answer your question: I do not want to miss this important visual check by hiding everything.

The other day, we got a problem that a user accidentally changed a hyperstack channel while a macro was running, so that the measurements were taken from the wrong channel.

Such a thing can happen easily, even if ImageJ is not in the front: clicking the scrollbar of a partly hidden hyperstack could change the channel and spoil the measurements. Keeping ImageJ hidden (as long as the user wants to) would be a big improvement. From other applications on the Mac, I am used that some icon on the dock is jumping to ask for attention when necessary. In case of ImageJ, this technique would be appropriate whenever a dialog is called, but otherwise the state of visibility should not be changed. I wonder whether Java supports this.

Best regards, Norbert


On 15. Jan 2014, at 13:28, Curtis Rueden <[hidden email]> wrote:

Hi Norbert,

> I only could work-around by setting everything into batch mode (not
> practical)
...
> Ideally, after processing I would tell ImageJ to return to visibility
> and show "Processing finished".

Isn't that exactly what batch mode is for? Why is batch mode "not
practical"?

Regards,
Curtis


On Tue, Jan 14, 2014 at 3:24 PM, Norbert Vischer <[hidden email]>wrote:

> Hello All,
>
> I would like to use menu command:
>   ImageJ>Hide ImageJ
> (on the Mac) to perform longish image processing invisibly, and avoid that
> clicking accidentally into an image, or pressing a  key that switches to a
> different hyperstack channel, disturbs the macro operation.
>
> However, whenever ImageJ opens a new window (see macro), it returns to
> visibility.
> The current behaviour appears not logical to me. I only could work-around
> by setting everything into batch mode (not practical) or to switch to a
> different "Space" (not practical either).
> Ideally, after processing I would tell ImageJ to return to visibility and
> show "Processing finished".
>
> //open an image every 2 sec:
> for (jj = 1; jj <=10; jj++){
>        newImage("ABC"+jj, "8-bit random", 400, 400, 2);
>        wait(2000);
>        close;
> }
>
>
> Norbert Vischer
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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

Norbert Vischer
Research Engineer
Centre for Advanced Microscopy
Swammerdam Institute for Life Sciences (SILS)
University of Amsterdam
Science Park 904
1098 XH Amsterdam, the Netherlands

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: How to "Hide ImageJ" during macro execution?

Michael Schmid
Hi Norbert,

just an uneducated guess: I suspect that the feature of unhiding a program when it opens a window is a property of MacOS, not under the control of java.

Maybe you could run your macro in BatchMode, and just use one dedicated window for displaying the current status/progress?
I have not tried, but I guess that updateDisplay() also works in BatchMode.

Michael
________________________________________________________________
On Jan 15, 2014, at 15:09, Norbert Vischer wrote:

> Hi Curtis,
>
> when designing macros, I carefully think about what should be visible on the screen. Then, the user can follow and understand what is being done, which particles are rejected and why, how montages or graphics are gradually built. For this, Wayne fortunately implemented in the last few weeks setBatchMode("show/hide"), and a selection-sensitive Image>Zoom>Set. Now I can control exactly what is being displayed, and hide flickering temporary windows.
> The user usually observes the start of the process, and once everything looks promising, he can do other things in other applications, and he can occasionally look  how far ImageJ has proceeded meanwhile.
> To answer your question: I do not want to miss this important visual check by hiding everything.
>
> The other day, we got a problem that a user accidentally changed a hyperstack channel while a macro was running, so that the measurements were taken from the wrong channel.
>
> Such a thing can happen easily, even if ImageJ is not in the front: clicking the scrollbar of a partly hidden hyperstack could change the channel and spoil the measurements. Keeping ImageJ hidden (as long as the user wants to) would be a big improvement. From other applications on the Mac, I am used that some icon on the dock is jumping to ask for attention when necessary. In case of ImageJ, this technique would be appropriate whenever a dialog is called, but otherwise the state of visibility should not be changed. I wonder whether Java supports this.
>
> Best regards, Norbert
>
>
> On 15. Jan 2014, at 13:28, Curtis Rueden <[hidden email]> wrote:
>
> Hi Norbert,
>
>> I only could work-around by setting everything into batch mode (not
>> practical)
> ...
>> Ideally, after processing I would tell ImageJ to return to visibility
>> and show "Processing finished".
>
> Isn't that exactly what batch mode is for? Why is batch mode "not
> practical"?
>
> Regards,
> Curtis
>
>
> On Tue, Jan 14, 2014 at 3:24 PM, Norbert Vischer <[hidden email]>wrote:
>
>> Hello All,
>>
>> I would like to use menu command:
>>  ImageJ>Hide ImageJ
>> (on the Mac) to perform longish image processing invisibly, and avoid that
>> clicking accidentally into an image, or pressing a  key that switches to a
>> different hyperstack channel, disturbs the macro operation.
>>
>> However, whenever ImageJ opens a new window (see macro), it returns to
>> visibility.
>> The current behaviour appears not logical to me. I only could work-around
>> by setting everything into batch mode (not practical) or to switch to a
>> different "Space" (not practical either).
>> Ideally, after processing I would tell ImageJ to return to visibility and
>> show "Processing finished".
>>
>> //open an image every 2 sec:
>> for (jj = 1; jj <=10; jj++){
>>       newImage("ABC"+jj, "8-bit random", 400, 400, 2);
>>       wait(2000);
>>       close;
>> }
>>
>>
>> Norbert Vischer
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> Norbert Vischer
> Research Engineer
> Centre for Advanced Microscopy
> Swammerdam Institute for Life Sciences (SILS)
> University of Amsterdam
> Science Park 904
> 1098 XH Amsterdam, the Netherlands
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

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