PatchControls

class ibb.widgets.PatchControls(**kwargs: Any)[source]

This widget shows 4 different buttons to control an index with regards to a width and height.
It’s intended use case is to control the patch that is displayed in the PatchViewer.

Parameters

TODO

Examples

Warning

Note that the widgets are not responding as we do not have a python backend running!

[1]:
import ipywidgets
import ibb
[2]:
ctrl = ibb.widgets.PatchControls(total_width=10, total_height=20)
out = ipywidgets.Output()

def observe_index(change):
    out.clear_output()
    with out:
        print(ctrl.index_width, ctrl.index_height)

ctrl.observe(observe_index, names=['index_width', 'index_height'])
[3]:
ipywidgets.VBox([ctrl, out])
[3]: