ViewerBase¶
-
class
glue.core.application_base.ViewerBase(session)[source]¶ Bases:
glue.core.hub.HubListener,glue.utils.misc.PropertySetMixinBase class for data viewers in an application
Attributes Summary
axeslayersReturn a tuple of layers in this viewer. positionReturn the location of the viewer as a tuple of (x, y)sessionviewer_sizeReturn the size of the viewer as a tuple of (width, height)Methods Summary
add_data(data)Add a data instance to the viewer add_layer(layer)add_subset(subset)Add a subset to the viewer apply_roi(roi)Apply an ROI to the client layer_view()move([x, y])Reposition a viewer within the application. options_widget()register_to_hub(hub)request_add_layer(layer)Issue a command to add a layer restore_layers(rec, context)Given a list of glue-serialized layers, restore them unregister(hub)Abstract method to unsubscribe from messages Attributes Documentation
-
axes¶
-
layers¶ Return a tuple of layers in this viewer.
A layer is a visual representation of a dataset or subset within the viewer
-
position¶ Return the location of the viewer as a tuple of
(x, y)
-
session¶
-
viewer_size¶ Return the size of the viewer as a tuple of
(width, height)
Methods Documentation
-
add_data(data)[source]¶ Add a data instance to the viewer
This must be overridden by a subclass
Parameters: data :
DataData object to add.
-
add_subset(subset)[source]¶ Add a subset to the viewer
This must be overridden by a subclass
Parameters: subset :
SubsetSubset instance to add.
-
move(x=None, y=None)[source]¶ Reposition a viewer within the application.
- x : int, optional
- Offset of viewer’s left edge from the left edge of the parent window.
- y : int, optional
- Offset of the viewer’s top edge from the top edge of the parent window.
-