gdesk.core.gui_proxy module

class gdesk.core.gui_proxy.GuiMap

Bases: object

gui_proxies = {}
redirects = {}
valid()
class gdesk.core.gui_proxy.GuiProxy(qapp=None, master_call_queue=None, master_return_queue=None, process_ready_call=None)

Bases: object

Communication channel to the gui Master and Slave Across Procecess and Threads

decode_func(func_id)
encode_func(func, register=False)
static exit()

Exit Gamma Hawk

static get_panel_ids(category)

Returns all current panal ids of a category. The last one is the selected one.

Returns

current panal ids

Return type

list

gui_call(func, *args, **kwargs)
static history(count=20)

The command history

Parameters

count (int) – Show the last count elements

Returns

Command history as list

Return type

list

is_main()
static load_layout(name='console')
static menu_trigger(category, pandid, action_names, *args, **kwargs)

Trigger a menu action of a panel.

Parameters
  • category (str) – Example ‘image’

  • id (int) – Example 1

  • action_names (list) – Example [‘File’, ‘New…’]

static pull()

Pull and object from the gui data stack

Returns

The object

static push(obj)

Push an object on the gui data stack

Parameters

obj (object) – A pickable object

push_list = []
property qapp

The QApplication instance. Is only visible in the gui thread.

register_object(obj)
retrieve_object(key)
show(*args, **argv)

Shows a object in an suitable panel

You can give more then one object to display, multiple viewers will be created.

Parameters

select (int) – selects which viewer shows the object (start with 1! 0 in GH1) negative numbers stands for last selected, or the selected before that, or before that

property vr

The roi sliced numpy array of the current image viewer

property vs

The shared array on the current image viewer Note that the data is on shared memory. vs[:] or vs.ndarray to view it as a real numpy array

class gdesk.core.gui_proxy.GuiProxyBase

Bases: object

category = None
classmethod close(panid=- 1)

Close the selected panel of the category

classmethod derivedClasses()
classmethod menu(action_names, *args, **kwargs)

Call a certain menu item of the panel

Parameters
  • action_names (list) – Example [‘File’, ‘New…’]

  • *args – Positional arguments of the menu call

  • **kwargs – Keyword arguments of the menu call

classmethod new(paneltype=None, windowname=None, *args, **kwargs)
classmethod selected()

Return the panel id of the selected panel if this category.

class gdesk.core.gui_proxy.RedBull(interval=60)

Bases: object

disable()
do()
enable(interval=None)
loop(interval)
start(interval)
stop()
gdesk.core.gui_proxy.StaticGuiCall(func)
gdesk.core.gui_proxy.register_objects_in_ghawk2_init()