BioImage-Archive / bia-explorer

Python package for exploring BIA data
Apache License 2.0
2 stars 1 forks source link

Simplify example code for showing images #4

Open haesleinhuepf opened 6 months ago

haesleinhuepf commented 6 months ago

Hi all,

this is just a proposal to simplify example code for visualizing images from the bioimage archive. [This example notebook]() contains example code for visualizing an image:

image

This seems complicated and might be deterrend for Python beginners who just want to explore the bioimage archive. Furthermore, the output does not render on the github-webpage. I'm proposing to use libraries such as stackview instead:

image

liviuba commented 5 months ago

Hi @haesleinhuepf

Thanks for your suggestions! Stackview looks really cool, and could enable interesting ways to do interactive visualisation of our data in Jupyter.

Would you be interested in contributing an example notebook for how to get the most out of stackview on BIA data? We can then update the image loading code to use our newer API.

Kind regards, Liviu

haesleinhuepf commented 5 months ago

Hi @liviuba ,

sure! I could for example send this notebook as PR:

https://github.com/ScaDS/BIDS-lecture-2024/blob/main/02a_remote_files/exploring_bioimage_archive.ipynb

Or is it too long? Let me know what you think!

Best, Robert

liviuba commented 5 months ago

Hi @haesleinhuepf ,

That notebook would really be a good example! If you would like to add a PR with it, I can update some of the code cells to use the latest explorer api.

Kind regards, Liviu

haesleinhuepf commented 5 months ago

Hi @liviuba ,

sure! I'm curious, how was the API changed? I can't find any remark in the release notes...

Thanks!

liviuba commented 5 months ago

Hi @haesleinhuepf ,

That is a very good question!

First, to put the current changes in context, the initial versions of the bia-explorer and the bia client were more experimental and (relatively) low volume, intended mostly to explore the constraints we would be working under when making BIA data more accessible.

Since then, we developed an api that can handle the scale of existing (and future) BIA metadata. We are now in the process of fully transitioning to it, but haven't moved all the data over yet. Between only having a very small subset of the full BIA data in the api, and some breaking changes that would need to happen as we move over to the new data layout, we've been maintaining backwards compatibility with code that might already exist, so didn't remove the initial bia-explorer code or example notebooks yet. This is all ongoing work, and there are still some loose ends (docs, changelogs) to tie before committing to a full transition.

The recent changes to bia-explorer (mostly adding this) added support for the client for our new api, which is where we are also currently maintaining the data repository, along with some convenience features (e.g. study.images and various helpers to access the data).

Adding "clean documentation" for the explorer is one of the loose ends we are working on, but in the meanwhile we maintain the example notebooks as a reference for what the explorer module supports.

I hope this answers your question, and also highlights some of the reasoning behind the changes we will be making as we go from the current alpha version to a major release.

Kind regards, Liviu