xmcdpy.stack_display

class xmcdpy.stack_display.StackDisplay(fig, ax, X, block=False, titles=None)

Bases: object

Class for displaying a stack of images. Scroll for going through the stack, double click for movie. Single click stores the last click in the selected_coords property

get_selected_rect()

Gets the last two selected coordinates ordered in appropriate manner for rect_coord.

on_close(*args, **kwargs)
onclick(event)
onscroll(event)
update()

Updates the display

update_animation(frame)
xmcdpy.stack_display.show_mask(img, mask, inverted=False)

Overlays the mask over the image and shows it on the plot

xmcdpy.stack_display.show_rect_coord(img, rect_coord)

Shows rect_coord as a mask using show_mask.

xmcdpy.stack_display.show_stack(images, rect_coord=None, block=False, titles=None)

Creates a figure and shows the stack using StackDisplay. Returns the stack class reference to which has to be kept. Additionally, rect coordinates can be passed if only a a rectangular section of the image is wanted.