Conversation
|
basic image widget without gridplot is functional, takes slider axes arguments BasicCan choose the dimension index that the slider should use is desired img_widget.mp4Complex axes order argumentsBy default it assumes that the "t" dimension is for the slider but any dimension can be used for the slider img_widget_axes.mp4 |
|
If it is a single plot and not a gridplot, we can show a z-axis slider vertically. Maybe once #30 is done we can use the docked viewports to show sliders for individual subplots by creating widgets using |
…try the crazier combinations
|
basic functionality of simple and gridplots work! img_widget_both.mp4Did some light testing, errors for basic user mistakes are caught correctly, tried different kwargs like this, need to test more thoroughly. a = np.random.rand(100, 512, 512, 5)
b = np.random.rand(100, 512, 512, 5)
c = np.random.rand(100, 512, 512, 7)
d = np.random.rand(100, 512, 512, 7)
iw = ImageWidget([a, b, c, d], slider_axes=["t", "z"], axes_order="txyz", cmap="gnuplot2")
iw.show() |
|
can now average across multiple dims in both single and gridplots
averaging in single plotsimgwidget_avg_single.mp4averaging multiple dims in gridplot (can also average multiple dims in single plot)imgwidget_avg_grid.mp4 |
…dget does auto vmin vmax
|
just for fun, 66 for handling all the possible args 🙃 |
start implementing #31
TODO:
quick_min_max()boolkwarg for vmin vmax range-slidersaxes_orderandslider_axeswindow_functionto allow applying a function along chosen dimension(s) using a window around the current indexslice_avgso that a user can just pass any function that takes anaxisargument. They can create a wrapper if it doesn't take anaxiskwarg.window_funcs = {"t": (np.mean, 5), "z": None})frame_apply, user can provide a single function (for simple plot) or a dict of functions mapping eachdataarray to a function that is called and applied on each slice before it is displayed. This function is called on the output of thewindow_functionif it exists. These function(s) must return a 2D array-like