Open tibuch opened 1 year ago
Thanks for reporting this @tibuch. You're running into the same issue that we are seeing here as well: https://github.com/mobie/spatial-transcriptomics-example-project/issues/21 (I checked this in your example project, and you can see all channels in the default view if you zoom in enough that the highest resolution is loaded). -> so there seems to be an issue with loading higher scale levels (potentially in MoBIE-io). I will follow up on this here later.
Ok, briefly: the issue seems to be that ome.zarr values are not loaded correctly for channels > 1 for a MIP Level > 0. I am not sure if this already happens in mobie-io or in the actual mobie code.
The easiest way to check this in mobie-io would be to extend the tests here to also load values from higher MIP levels. I am pretty busy this week, but if one of yu @tibuch or @tischi would have time to look into it I can generate the expected values for this test.
(Otherwise I should have time to at least do the mobie-io tests next week; but I would need a ping again here...)
I may have some time on Friday to look into extending the tests.
If @tibuch would like to contribute a little bit of Java code here that'd be of course highly welcome :heart:
Should we for now just check whether it returns values > 0 at some of the downsampled resolutions, until @constantinpape gives us some real values?
Happy to contribute, but a bit rusty in terms of what is what. Maybe @tischi and I can carve out an hour or two on Friday and do a pair-zoom-programming?
Currently clean & install-ing the project :wink:
Should we for now just check whether it returns values > 0 at some of the downsampled resolutions, until @constantinpape gives us some real values?
That's a good point. Once you have the structure for this test I can also easily put in the actual values myself.
@constantinpape and @tischi just figured out that everything works fine iff the chunk-size is 1 for the channel dimension.
which makes a lot of sense :-)
@constantinpape
Just an FYI. I wrote the ome-zarr beforehand and did not use mobie-python for it.
Depending on what you decide, we might want to add a warning/assertion somewhere.
what did you use to create the OME-Zarr?
ok, let's try to fix it then in our reader...
from ome_zarr.writer import write_image
with defaults can result in chunks > 1 for the channel dimension.
- what is your mobie-python doing there when writing the data?
I am also not quite sure there; I should def. make sure that it writes with a chunk size of 1, which will be more efficient regardless.
what did you use to create the OME-Zarr? ok, let's try to fix it then in our reader...
Yeah, if possible it would still be good to fix this.
@tibuch
in the current implementation it would read the data N times if there are N channels => definitely go for chunk size 1 for the channel dimension.
to avoid this we would have to cache/reuse the SpimData object, which is doable.
Hi,
I have built a MoBIE project which uses an underlying ome-zarr file with 4 channels. I have the single channel views and then used these to assemble a grid-view. Then I set the grid-view to be the default view.
~Now, when I load the MoBIE project I only get displayed the grid-view but only the first two channels show up. However, I can select the individual views for all four channels and add them to the view. Then they all show up as they should.~ The issue is the same for grid-view and single views.
I have uploaded the MoBIE project and the zarr-file here.
This is the dataset.json: