Open haesleinhuepf opened 4 months ago
Also stackview.crop deserves mentioning in bia-bob
In this file, there are the suggestions we need to improve:
https://github.com/haesleinhuepf/stackview/blob/main/stackview/_bia_bob_plugins.py
It might be helpful to take some hints from this notebook:
https://github.com/haesleinhuepf/stackview/blob/main/docs/crop.ipynb
git-bob, think about how to improve stackview/_bia_bob_plugins.py
This message was generated by git-bob (version: 0.2.4, model: gpt-4o-2024-08-06), an experimental AI-based assistant. It can make mistakes and has limitations. Check its messages carefully.
To enhance bia-bob
with additional suggestions as per the input files and comments, consider updating the list_bia_bob_plugins
function in stackview/_bia_bob_plugins.py
as follows:
def list_bia_bob_plugins():
"""List of function hints for bia_bob"""
return """ * Displays an image with a slider and label showing mouse position and intensity.
stackview.annotate(image, labels)
* Allows cropping an image along all axes. Supports parameters like 'continuous_update', 'zoom_factor', 'slider_text', and 'axis_names'.
stackview.crop(image, continuous_update=True, zoom_factor=0.75, slider_text="Slice", axis_names=["Z", "Y", "X"])
* Showing an image stored in variable `image` and a segmented image stored in variable `labels` on top using an interative curtain. Also works with two images or two label images. Includes an 'alpha' parameter to set transparency of the curtain.
stackview.curtain(image, labels, alpha=1)
* Showing an image stored in variable `image` and a segmented image stored in variable `labels` on top with animated blending. Also works with two images or two label images.
stackview.animate_curtain(image, labels)
* Showing an animation / timelapse image stored in variable `image`.
stackview.animate(image)
* Save an animation / timelapse stored in variable `image` with specified frame delay to a file.
stackview.animate(image, filename="output.gif", frame_delay_ms=100)
* Display an image stored in a variable `image` (this also works with label images). Prefer stackview.insight over matplotlib.pyplot.imshow!
stackview.insight(image)
* Build a user interface with sliders for numeric parameters
stackview.interact(func, image)
* Display an image and allows slicing in three dimensions (Z, Y, and X).
stackview.orthogonal(image)
* Display an image with a slider and label showing the mouse position and intensity.
stackview.picker(image)
* Display two images side by side, with an additional overlay view of their overlap
stackview.side_by_side(image1, image2)
* Display an image with a slider to navigate through a stack.
stackview.slice(image)
* Allows switching between multiple images and displaying them with a slider.
stackview.switch(images:list)
* Allows plotting a scatterplot of a pandas dataframe while interactively choosing the columns and using a lasso tool for selecting data points
stackview.scatterplot(dataframe, column_x, column_y, selection_column)
* Allows plotting a scatterplot of a pandas dataframe in relation to a label image and optionally an image
stackview.clusterplot(image=image, labels=label_image, df=dataframe, labels, column_x, column_y, selection_column, image)
* Draw two connected scatterplots of a pandas dataframe in relation to a label image and optionally an image
import ipywidgets as widgets
from ipywidgets import HBox
import stackview
def update2(e=None):
widget2.update()
def update1(e=None):
widget1.update()
widget1 = stackview.scatterplot(df=dataframe, column_x="column1", column_y="column2", selection_changed_callback=update2)
widget2 = stackview.scatterplot(df=dataframe, column_x="column3", column_y="column4", selection_changed_callback=update1)
display(HBox([widget1, widget2])) # Arrange the widgets side by side using HBox
"""
This enhancement includes specific parameters and their descriptions for the stackview.crop
and stackview.curtain
functions, improving the usability of bia-bob
for developers who leverage these functionalities.
For example, the alpha parameter of curtain would be useful, if bia-bob suggested it.