Dialog window without background shading for live manual refocussing

Everything OAD-related that won't fit in the other categories: share general aspects of macro programming and discuss the OAD environment
Post Reply
Gaspard Pardon
Posts: 1
Joined: Tue Sep 08, 2020 10:22 am

Dialog window without background shading for live manual refocussing

Post by Gaspard Pardon »

Hi,

I am wondering how to program a dialog window where the user can adapt some acquisition parameter and refocus on the sample manually before to continue.
I could successfully program the dialog window and entry field and the user can do the refocussing manually, however, the dialog window introduces a shading over the background, i.e. the Zen main windows is shaded, rendering the refocussing difficult.

Code: Select all

      #Initialize dialogue box for refocussing and skipping cell positions
       diagwin = ZenWindow()
       diagwin.Initialize('Automation control',600,300,True,True)
       diagwin.AddLabel('Adjust focus if not already optimal \n Alternatively, select which position to jump to and/or (de)activate autofocu\n, Then press OK to continue or Cancel to terminate experiment','0','0')
       diagwin.AddCheckbox('use_af','Activate autofocus',use_af,'1','0')
       diagwin.AddIntegerRange('icellval','Enter Cell position number',cellpos+1,1,len(positionlist),'2','0')
       result=diagwin.Show()
If I use a

Code: Select all

Zeiss.Micro.Scripting.Windows.ContinueWindow()
there is no shading. I suppose that the

Code: Select all

.pause
would probably also work, but neither allows for parameters control.

So the question is how to make the dialog window with a transparent (and possibly interactivity with Zen in the background, e.g. change channel) possible.

Thanks!
Fredrik Olsson
Posts: 16
Joined: Mon May 25, 2020 9:53 am

Re: Dialog window without background shading for live manual refocussing

Post by Fredrik Olsson »

Hi,

I agree with Gaspard Pardon. I also would like to know if there is a good way to be able to adjust the camera/microscope controls while having a dialog window open. As it is now I use a combination of pause windows where the background is not shaded and ordinary windows which let me adjust at least the microscope physical controls. However, for the camera parameters I have not found a good way to use it interactively (it would be good to reach the advanced camera "module" to use it interactive in a macro and not just as a separate module in a workflow).

Kind regards
Fredrik Olsson
CarlZeissMicroscopy3
Posts: 180
Joined: Wed May 20, 2020 10:10 am

Re: Dialog window without background shading for live manual refocussing

Post by CarlZeissMicroscopy3 »

Hello all,

very interesting aspect that can be easily validated by comparing

Zen.Application.Pause(" ")

with

zw = ZenWindow()
zw.Show()

The Application.Pause lets you work with Zen in the background while ZenWindow.Show 'disables' Zen and no interaction is possible. ZenWindow.Show was originally designed for very strict workflows, but your arguments are evident.

I have posted a task for the development team to implement a ZenWindow.Show(true) which shows the same behavior as Application.Pause as far as the interaction with Zen is concerned.

Thanks for this contribution!
orbor neee.2
Posts: 1
Joined: Mon Nov 27, 2023 8:31 am

Re: Dialog window without background shading for live manual refocussing

Post by orbor neee.2 »

The Application.Pause lets you work with Zen in the background while ZenWindow.Show 'disables' Zen and no interaction is possible. ZenWindow.Show was originally designed for very strict workflows, but your arguments are evident.
Post Reply