fractal-analytics-platform / fractal-vizarr-viewer

Prototype to explore serving/viewing zarr data
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

[vizarr] Explore why/when channels are selected by default #20

Closed tcompa closed 2 months ago

tcompa commented 2 months ago

In at least one case, the starting view is black/empty image

After selecting a channel, the image is show image

In some other cases, channels are all selected by default upon loading the page.

What is it that leads to one situation or the other? First guess: is it due to the number of channels (one vs many)? If so, can we tell vizarr to always pre-select single channels?

To be verified, and discussed in the vizarr repo if appropriate.

tcompa commented 2 months ago

Based on two examples with different behaviors, I confirm this is due to whether the omero/channels/active attribute is set to true.

tcompa commented 2 months ago

The relevant code block that sets visibilities is

https://github.com/hms-dbmi/vizarr/blob/305167f69bc5096e98345da6901734eb01204d1d/src/ome.ts#L300-L332