mobie/mobie-utils-python

Support more table formats

Closed this issue ยท 10 comments

Adding segmentations using this Python library currently requires tables to be in the form of the MoBIE spec (label_id, anchor_{xy}, ...).

It would be great if the other table formats discussed in mobie/mobie-viewer-fiji#935 were also supported (in particular the skimage table format, so we can directly add a DataFrame derived from regionprops measurements).

We currently don't support all the table formats listed in #935 in mobie projects yet, but only for opening arbitrary data via the MoBIE CLI. I think we should support this in MoBIE projects as well at some point, but I would wait with this until the MoBIE CLI and other new functionality is more stable. In particular I would wait till after the next release, that will include the MoBIE CLI and other features. (And that will also force us to better define the differences between MoBIE projects and what can be opened by the CLI).

After thinking about this again: maybe we support this for MoBIE projects in Fiji already. (And if yes it would be easy for me to also support this here).
@tischi: Is it already possible to open tables in the skimage format etc. in MoBIE projects?

I tried with headers corresponding to a scikit-image (regionprops) table, and while MoBIE apparently recognizes the right table type, it still looks for a label_id column (instead of label) at some point during the opening process, and throws an error accordingly.

Thanks for checking @imagejan!

@tischi: as said above I think we should in principle support all the table flavors in both MoBIE projects and the CLI. But of course it's up to you to prioritize when to implement this. Or maybe you would like to contribute this, @imagejan?
I can then update the support for it here and also extend the documentation as soon as this is supported by MoBIE-Fiji.

It could be that this is very easy to fix in MoBIE (maybe the above commit does it already).

@imagejan Could you try it from the develop branch?
If you clone it and go to test/java/develop/projects/ you find millions of examples for how to launch MoBIE from Java.

Thanks! The quick fix would fail in other cases, but I pushed a new commit to develop that should cover all cases. Could you please try?

@tischi thanks, mobie-viewer-fiji from mobie/mobie-viewer-fiji@2801f96 works fine for me ๐Ÿ‘.

I tested both with "MoBIE-sytle" and with scikit-image-style headers inside a MoBIE dataset.

I have now added support for the skimage style tables in #102, but have not tested this yet. Let me know if this works for you @imagejan, or if you run into any issues with it.
(It's now also very easy to add support for more table formats, but the skimage one is currently the only additional format which is explicitly described in mobie/mobie-viewer-fiji#935).

Support for all current table flavors is now added. I will draft a new release and close this issue. Feel free to reopen if anything is still missing @imagejan.