-
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
TableOpener returns empty column list for header-only tables #1009
Comments
To me it seems to make sense that this returns an empty column list?! Does this then throw an error somewhere in MoBIE? |
Yes, sorry I didn't specify. MoBIE throws this exception:
... and the BDV window stays empty. I would have expected an empty table (but with all column headers present) to be shown (if this is the only table source), or that the merged table of all sources is displayed (obviously containing no row from this specific, empty, position). But I can see this might be difficult due to how TableSaw's auto-guessing of column types depends on the presence of data. (See also: jtablesaw/tablesaw#815) |
This error is in fact from MoBIE trying to auto-guess whether this is an skimage or MorphoLibJ table (in the code that I showed you). What I do not understand is that for that it only needs the column names. If you want to have a look you could compile the |
Exactly. MoBIE would only need the column names. But TableSaw (and therefore |
OK, sorry, then I did/do not understand your very first post: " the TableOpener.open() method returns a table with an empty column list:" In the text below there are column names |
Sorry for being not clear. I edited the original post to clarify these are examples of input |
Ah, Then, in fact, I guess the best would be to fix this in the issue that you linked. Would you mind following up in the tableaw issue? The developer is usually very nice and responsive! |
According to jtablesaw/tablesaw#815 (comment), the behavior of My use case is a MoBIE dataset where we add a segmentation that only contains objects in some, but not all, wells. This leads to some of the |
Can you during creation detect that there are no objects and then just save no table at all for those wells? Actually, what about the corresponding label mask image, is that just an all zero image? |
Yes, the underlying image is just an all-zero array (inside an ome-zarr structure in our case). Not writing the table would also mean not adding the segmentation source for that well in the first place, right? So we'd have to create a sparse merged grid view, I guess that's possible... |
@imagejan I just had a look and there is an Looks like a cleaner solution to me than having empty images and empty tables. If you can make a minimal example project and there are issues with this approach, I can try to fix it! |
@tischi Alright, I'm finally coming back to this issue.
The problem with this approach is that MoBIE Viewer seems to shift the minimum grid position to the origin of the BDV source, and this independently for each grid view. That is, if your images have e.g. well C03 at the top left corner (translating to grid position Also, if you happen to have a plate where all wells are empty for that segmentation channel, this empty grid view lets the validation (using /cc @SabineReither |
For reference, the mobie-viewer-fiji/src/main/java/org/embl/mobie/lib/image/StitchedImage.java Lines 202 to 214 in 8191c91
Maybe an accurate fix would be to avoid setting the min to zero, and (regarding the comment in the source code) instead fix the RegionImage to get displayed the correct way to have identical positions? |
Yes, that would be good! I am travelling right now. Can only look into it in about 2 weeks... |
When a table (
default.tsv
) contains only column headers and no data rows, theTableOpener.open()
method returns a table with an empty column list:Input file:
Output:
As soon as you have a single data row, all is fine:
Input file:
Output:
This behavior causes problems e.g. for MoBIE datasets representing HCS plates that contain segmentations that can be empty for some wells.
Here's a Fiji script I used to test the loading behavior:
The text was updated successfully, but these errors were encountered: