GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — High level widgets · Issue #31 · fastplotlib/fastplotlib Closed Milestone DescriptionTakes numpy array-like (such as something like: from fastplotlib.widgets import ImageWidget import cv2 import pims a = pims.open("img.tiff") # array-like of shape [n_frames, x, y] vid = pims.open("vid.avi") # array-like of shape [n_frames, x, y, rgb_channels] # produces a slider for each axis passed to `slider_axes` # additional kwargs are passed to `graphics.Image`, such as `cmap` iw = ImageWidget(data=a, slider_axes=0, axis_order="txy", **kwargs) # could also specify slider axis from one of the axis_order indicators # this could be the default kwarg for slider_axes iw = ImageWidget(data=a, slider_axes="t", axis_order="txy", **kwargs) iw.show() # returns `VBox` of `ImageWidget` and `ipywidgets.IntSlider` # multiple sliders iw = ImageWidget(data=a, slider_axes=["t", "z"], axis_order="tzxy", **kwargs) # pass a frame apply function that is applied to the frame array when `update_frame()` is called to_gray = lambda rgb_frame: cv2.cvtColor(rgb_frame, cv2.COLOR_BGR2GRAY) iw_vid = ImageWidget(data=b, slider_axes=0, frame_apply=to_gray) # Same widget but with gridplot, pass list of array-like iw_grid = ImageWidget( data=[a, b], slider_axes=0, # use 0th axis for a single slider for both arrays frame_apply={b: to_gray} ) iw_grid.show() # if a.shape[0] != b.shape[0] it can print a warning and just not update `a` when it goes out of bounds for it, but continue updating `b` # create multiple sliders for different dimensions iw_grid_async = ImageWidget( data=[a, b], slider_axes=["t", "z"], axes_order={a: "tzxy", b: "xyzt"}, slice_avg={"t": 10, "z": 1}, # window size for slice averaging along some axes frame_apply={b: to_gray} ) iw_grid_async.show() Reacted by Eric Thomson Activity
MetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |