Skip to content

Handling OME-TIFF scale metadata in napari workflows #1

@alandolt

Description

@alandolt

Hey,
Just wanted to bring this up for discussion. No urgency on this, I just noticed it while testing.

If you load an OME-TIFF in napari using the official napari-tiff plugin (the one that splits channels automatically), the scale metadata is applied correctly. So for example, if the scale factor is 0.5, a 1024×1024 image is shown as 512×512 in physical units, which is great because you can measure directly in µm without doing manual conversions.

The issue appears when using napari-serverkit to send the image to imaging-server-kit. The napari extension only sends the raw array and drops the metadata (accordig to my testing, maybe I've did something wrong). The server then returns the segmentation mask as a normal 1024×1024 array with no scaling info, so the mask doesn’t match the scaled display of the original image in napari.

So the question is: how should we handle the scaling?

Option A: Have the napari extension also send the metadata (including scale). The imaging server would then keep track of it and send back the mask with the correct scale info, which napari could apply (e.g. using the scale parameter in add_labels()).

Option B: Handle it entirely on the napari client side. Meaning: keep the mask and the displayed layer aligned locally, without involving the server.

I’m curious what feels like the cleaner approach to others here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions