NEUBIAS / training-resources

Resources for teaching/preparing to teach bioimage analysis
https://neubias.github.io/training-resources
Other
48 stars 21 forks source link

Module batch processing: Loading results with MoBIE table fails #711

Open jhennies opened 3 months ago

jhennies commented 3 months ago

I'm trying to load the results of the batch processing with a mobie table.

For now, I made the table manually, looking like this:

In short:

image[TAB]labels
path/to/image.tif[TAB]path/to/labels.tif

In practice:

image[TAB]labels
https://github.com/NEUBIAS/training-resources/raw/master/image_data/xy_8bit__mitocheck_incenp_t1.tif[TAB]/media/julian/Data/courses/2024_2_skimage_napari_beginners/xy_8bit__mitocheck_incenp_t1_labels.tif

Then I use MoBIE -> Open -> Open Table... and fill the dialog like so:

image

Then the raw image opens as normal Fiji image

The console output is:

[ERROR] Command errored: Open Table...
java.lang.RuntimeException: java.lang.NullPointerException
    at org.embl.mobie.io.imagedata.SpimDataImageData.open(SpimDataImageData.java:132)
    at org.embl.mobie.io.imagedata.SpimDataImageData.getMetadata(SpimDataImageData.java:91)
    at org.embl.mobie.lib.data.ImageGridSources.setMetadata(ImageGridSources.java:188)
    at org.embl.mobie.lib.data.ImageGridSources.<init>(ImageGridSources.java:164)
    at org.embl.mobie.lib.SourcesFromTableCreator.<init>(SourcesFromTableCreator.java:93)
    at org.embl.mobie.MoBIE.<init>(MoBIE.java:193)
    at org.embl.mobie.command.open.OpenTableCommand.run(OpenTableCommand.java:112)
    at org.embl.mobie.command.open.OpenTableCommand.run(OpenTableCommand.java:84)
    at org.scijava.command.CommandModule.run(CommandModule.java:196)
    at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:125)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:64)
    at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:247)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
    at ch.epfl.biop.bdv.img.imageplus.ImagePlusToSpimData.getSpimData(ImagePlusToSpimData.java:62)
    at org.embl.mobie.io.imagedata.TIFFImageData$1.open(TIFFImageData.java:38)
    at org.embl.mobie.io.imagedata.SpimDataImageData.open(SpimDataImageData.java:121)
    ... 16 more

The Log output is:

# MoBIE
Opening data from table: /media/julian/Data/courses/2024_2_skimage_napari_beginners/mobie_table.csv
Fetching metadata for image, channel 0
Source: https://github.com/NEUBIAS/training-resources/raw/master/image_data/xy_8bit__mitocheck_incenp_t1.tif
jhennies commented 3 months ago

ping @k-dominik

tischi commented 3 months ago

https://github.com/NEUBIAS/training-resources/raw/master/image_data/xy_8bit__mitocheck_incenp_t1.tif

It could be that the current code in MoBIE cannot open http hosted TIFF images. Could you please try with locally stored files?

jhennies commented 3 months ago

Good, that works!

This is the output when adding a second image and changing "Grid" to "Transformed":

image

jhennies commented 3 months ago

If we decide to use this for the course, which of the following is easier?

k-dominik commented 3 months ago

I think downloading (maybe a zip with a few datasets) would get you the most realistic experience. Opening URLs is convenient in the course, but my feeling is that majority of people will deal with local files in their day to day.

tischi commented 3 months ago

Feel free to add the ZIP of the two images here.