-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open MoBIE projects from data other than a MoBIE project #811
Comments
The vision here is that in ilastik there should be just a "Save as OME-Zarr" and that should contain all the information. We don't have tables yet though, but you could already support saving the image and label masks.
Yes, I agree! We should support this! We are lacking person-power for the development at the moment. Do you happen to have a good Java programmer at hand? |
I agree, the best option would be to save everything as ome.zarr to avoid in memory data transfer logic (and then either also generate the json file for MoBIE to understand the data layout, or we simplify this part that we can open a MoBIE project from the ome.zarr directly). For the table: while we don't support tables in ome.zarr yet, we could also use tsv files in the meantime, which should be easy to export from the ilastik side. |
Definitely something we want to do! |
Branch to work on this: https://github.com/mobie/mobie-viewer-fiji/tree/issue811 |
Opening images in MoBIE from the command lineIt would also be useful to be able to open images in MoBIE from the command line. For me an example application would be visualizing features associated with segmented objects, very similar to the MorpholibJ use-case from above. But instead the feature computation etc. would be in python, so it would be nice to have a convenient way to open MoBIE directly from it.
For this the CLI should support (at least) the following arguments:
So after |
Thank you @constantinpape! That is in fact exactly how I also imagined the command line call to look like. @kutra would that work for your use-cases as well? |
Hey @tischi, my handle is @k-dominik :P ;_) I would also really much like to have the ability to open mobie with appropriate data from the command line, pretty much what @constantinpape described. I think what's a bit missing is how to specify the "flavor" of table you add to it. Depending on the source, column names might vary and so on. So of course there could be a small GUI that would pop up allow you to do these choices. On the other hand, the sources of such tables that I can think of are currently a handful (morpholibj, analyze particles, regionprops, ilastik) and it would be great to support those with some form of magic :). side note:
I am not a fan of allowing multiple arguments per option - There might be use-cases like having stacks across multiple files and that can get messy then really quickly. I'm more a fan of specifying options multiple times... Or to phrase it differently, multiple arguments should maybe mean stacks.
also related to allowing multiple images - would you allow multiple tables from different sources for a single image. Or different table sources for different images? Is the use case with multiple input images so important? |
I think @tischi is working on code to handle this (basically check the column names in the table and match them to the internal MoBIE representations).
I don't have a strong opinion on this and from my end both
To be nitpicky: in MoBIE syntax we would refer to tables associated with a
My suggestion would be to stick to the simplest solution that supports the relevant use-case. That is: each segmentation can have a single table associated with it, and we match tables to segmentation by the order of the cli argument, so:
The case of supporting multiple images and segmentations: yes, it's important, I think only supporting to add a single image and/or segmentation via the CLI would be very limiting. |
@k-dominik what image and table file formats would you like to use? Column namesWe could have a For custom tables where we don't have a profile I see two options: provide a config file What do you think? Image file formatsI think most file formats are obvious from the file ending. I think the most tricky case may be ilastik h5 files, because they are not supported by Bio-Formats, so we have to add an extra dependency and also somehow know that this is an ilastik h5 and not some other h5. What about adding a parameter |
You won't need an extra dependency for ilastik outputs besides hdf5, they are not really a separate file format, but I guess you would need to write a loader for them in mobie-io that supports single scale hdf5 files. However, the issue is that the output is not fully standardized (both in terms of the axis that are saved and the internal paths of the dataset in the h5 root).
Do you want to make it mandatory or optional? (And in the optional case try to figure it out from the file extension.) |
Currently it would be an nd-array with an arbitrary dataset name (it's up to the user to specify). Dimensionality is also not enforced or anything, but axis labels are always exported. Example java code for loading ilastik hdf5 files is in our ilastik4ij repo. Maybe we could restructure it to make it reusable more easily in the context of mobie? What probably makes the hdf5 datasets from ilastik identifiable (this would be infinitely backwards compatible, since this is added since forever) would be the serialized vigra axistags in the For the table files, we offer options for |
@k-dominik I made a new issue for the ilastik image files. Regarding @constantinpape what about I add a static method in |
Sounds good. |
I merge the branch |
Dear @tischi,
mobie looks so awesome! Getting your data in is still a little clunky though (as far as I know) with having to create a project first and all. I think many use cases could go directly from memory, ideally from fiji to open a mobie viewer instance with a given image, label-image and table. We have a PR open for the ilastik fiji plugin, that allows running object classification with a pre-trained project and that would load both the label image and a corresponding feature table back. Ideally one would be able now to easily open mobie - no writing of temp files.
Cheers :)
Dominik
The text was updated successfully, but these errors were encountered: