haesleinhuepf / git-bob-bioimage-analysis-example

BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

[Analysis Request]: Background removal + visualization #46

Open haesleinhuepf opened 2 hours ago

haesleinhuepf commented 2 hours ago

Bio-Image Analysis Support Request

Image Upload

📎 Drag & drop your microscopy image here (JPG, PNG, GIF, 512x512 or 1024x1024, 2D only).

373595967-9ea9fc9e-24cf-47e4-bc6d-c0786c18ade4

Analysis Goal

I have this image, I would like to apply a top-hat filter to it and I would like to visualize the original image and the filtered image using an animated curtain.

Python Tools

Note: Your images and the text you enter here may be sent to OpenAI's online serivce where we use a large language model to answer your request. Do not upload any data you cannot share openly. Also do not enter any private or secret information. By submitting this github issue, you confirm that you understand these conditions.

Once submitted, @haesleinhuepf will review and consult git-bob, an AI-assistant for bio-image analysis suggestions.

haesleinhuepf commented 2 hours ago

git-bob think about this

github-actions[bot] commented 2 hours ago

This message was generated by git-bob (version: 0.5.3, model: gpt-4o-2024-08-06, Run details), an experimental AI-based assistant. It can make mistakes and has limitations. Check its messages carefully.

from skimage.io import imread
from skimage.morphology import white_tophat, disk
import stackview

# Load the image
image = imread('your_image_path.jpg')

# Apply top-hat filter
selem = disk(20)  # you may adjust the size based on the structures in your image
filtered_image = white_tophat(image, selem)

# Visualize using stackview
stackview.animate_curtain(image, filtered_image)
haesleinhuepf commented 2 hours ago

Awesome! git-bob implement this! Download the image, and put it in the data folder. Create a new notebook in the notebooks folder and put the code above in it. Make sure that the data folder is "../data" from the notebook location, when loading the image.