gui_utils#

Various utility functions specific to the graphical interface

class TmpDebug(workspace)[source]#

Bases: object

clear_layout(layout)[source]#

Clears all widgets in the layout

Parameters:

layout

Returns

compute_grid(nb)[source]#
create_clearmap_widget(ui_name, patch_parent_class, window_title=None)[source]#
format_long_nb_to_str(nb)[source]#
get_current_res(app)[source]#
get_pseudo_random_color()[source]#

Return a pseudo random colour. The hue is random but The saturation and the value are kept in the upper half interval

Returns

get_random_color()[source]#
html_to_ansi(msg)[source]#
html_to_plain_text(msg)[source]#
is_dark(color)[source]#
Parameters:

QColor (color)

Returns

np_to_qpixmap(img_array, alpha)[source]#
project(img, axis, invalid_val=nan)[source]#
pseudo_random_rgb_array(n_samples)[source]#
surface_project(img)[source]#