Open MosGeo opened 1 week ago
Pinging @Czaki @jni as they have more experience with this repo - any guidance here?
When I wrote my multichannel reader, I always set the first layer to translucent and the rest to additive. As in this case, we have single RGB so translucent is more expected.
I agree with the symptom and the diagnosis. @MosGeo are you able to open a PR to fix? I think @Czaki's suggestion (first layer in the same reader call is translucent, additional layers are additive) is correct.
Aside: translucent_no_depth is for 3D rendering only, it means e.g. a bright pixel in the image (displayed in MIP mode) will not hide a point that is further away from the camera. For 2D rendering they are the same.
I am generating simple RGB OME-TIFFs. Everything is working as expected with saving the file using tifffile and napari-tiff is recognizing them as RGB images (
PHOTOMETRIC.RGB
) with one channel andSamplesPErPixel
of 3.The issue is that napari-tiff defaults to adding blending metadata as "additive" even for a simple RGB image. This means opening two of them in napari will mess things up. This is not the expected behaviour. The expected blending in this case is "translucent_no_depth" or "translucent" (i don't know the difference 🤣).
As far as I can see, this is not related to the ome-tiff file metadata and it is just related to how napari-tiff decides what blending to use. That being said, I can be mistaken.
The relevent line is: https://github.com/napari/napari-tiff/blob/8c704181275bc21e2ba220e4bd1bf44a97b204c4/napari_tiff/napari_tiff_metadata.py#L340
Attaching an example image here wolf.ome.tif.zip