ImageViewer

class glue.viewers.image.qt.ImageViewer(*args, **kwargs)

Bases: MatplotlibImageMixin, MatplotlibDataViewer

Attributes Summary

LABEL

allow_duplicate_data

tools

Methods Summary

addToolBar(-> None)

add_data(data)

add_layer(layer)

add_subset(subset)

apply_roi(roi[, override_mode])

This method must be implemented by subclasses

apply_subset_state(subset_state[, override_mode])

cleanup()

close(self)

closeEvent(*args)

Call unregister on window close

dragEnterEvent(event)

Accept drag-and-drop of data or subset objects.

draw_legend(*args)

dropEvent(event)

Accept drag-and-drop of data or subset objects.

export_as_script(filename)

get_data_layer_artist([layer, layer_state])

get_handles_legend()

Collect the handles and labels from each layer artist.

get_layer_artist(cls[, layer, layer_state])

get_subset_layer_artist([layer, layer_state])

hide_crosshairs()

hide_toolbars()

Disable all the toolbars in the viewer.

initialize_toolbar()

isVisible(self)

layer_view()

limits_from_mpl(*args, **kwargs)

limits_to_mpl(*args)

mdi_wrap()

Wrap this object in a GlueMdiSubWindow

mousePressEvent(event)

Consume mouse press events, and prevent them from propagating down to the MDI area.

move([x, y])

Move the viewer to a new XY pixel location

notify(message)

options_widget()

redraw()

register_to_hub(hub)

remove_all_toolbars()

remove_data(data)

remove_layer(layer)

remove_subset(subset)

remove_toolbar(tb)

request_add_layer(layer)

Issue a command to add a layer

set_focus(state)

set_status(message)

setup_callbacks()

show_crosshairs(x, y)

show_toolbars()

Re-enable any toolbars that were hidden with hide_toolbars()

unregister(hub)

Default unregistration action.

update_legend(*args)

Update the legend colors and opacity.

update_viewer_state(context)

update_window_title()

update_x_axislabel(*event)

update_x_log(*args)

update_x_ticklabel(*event)

update_y_axislabel(*event)

update_y_log(*args)

update_y_ticklabel(*event)

warn(message, *args, **kwargs)

Attributes Documentation

LABEL = '2D Image'
allow_duplicate_data = True
tools = ['select:rectangle', 'select:xrange', 'select:yrange', 'select:circle', 'select:polygon', 'image:point_selection', 'image:contrast_bias', 'profile-viewer']

Methods Documentation

addToolBar(self, area: Qt.ToolBarArea, toolbar: QToolBar)
addToolBar(self, toolbar: QToolBar) None
addToolBar(self, title: str) QToolBar
add_data(data)
add_layer(layer)
add_subset(subset)
apply_roi(roi, override_mode=None)

This method must be implemented by subclasses

apply_subset_state(subset_state, override_mode=None)
cleanup()
close(self) bool
closeEvent(*args)

Call unregister on window close

dragEnterEvent(event)

Accept drag-and-drop of data or subset objects.

draw_legend(*args)
dropEvent(event)

Accept drag-and-drop of data or subset objects.

export_as_script(filename)
get_data_layer_artist(layer=None, layer_state=None)
get_handles_legend()

Collect the handles and labels from each layer artist.

get_layer_artist(cls, layer=None, layer_state=None)
get_subset_layer_artist(layer=None, layer_state=None)
hide_crosshairs()
hide_toolbars()

Disable all the toolbars in the viewer.

This action can be reversed by calling show_toolbars()

initialize_toolbar()
isVisible(self) bool
layer_view()
limits_from_mpl(*args, **kwargs)
limits_to_mpl(*args)
mdi_wrap()

Wrap this object in a GlueMdiSubWindow

mousePressEvent(event)

Consume mouse press events, and prevent them from propagating down to the MDI area.

move(x=None, y=None)

Move the viewer to a new XY pixel location

You can also set the position attribute to a new tuple directly.

Parameters:
xint (optional)

New x position

yint (optional)

New y position

notify(message)
options_widget()
redraw()
register_to_hub(hub)
remove_all_toolbars()
remove_data(data)
remove_layer(layer)
remove_subset(subset)
remove_toolbar(tb)
request_add_layer(layer)

Issue a command to add a layer

set_focus(state)
set_status(message)
setup_callbacks()
show_crosshairs(x, y)
show_toolbars()

Re-enable any toolbars that were hidden with hide_toolbars()

Does not re-enable toolbars that were hidden by other means

unregister(hub)

Default unregistration action. Calls hub.unsubscribe_all on self

update_legend(*args)

Update the legend colors and opacity.

update_viewer_state(context)
update_window_title()
update_x_axislabel(*event)
update_x_log(*args)
update_x_ticklabel(*event)
update_y_axislabel(*event)
update_y_log(*args)
update_y_ticklabel(*event)
warn(message, *args, **kwargs)