ngff icon indicating copy to clipboard operation
ngff copied to clipboard

Storing only a label mask image

Open tischi opened this issue 3 years ago • 4 comments

@joshmoore @constantinpape

With the current specs, is it possible to only store labels without an image?

└── image.zarr                 
    │
    └── labels
        │
        ├── .zgroup
        │
        ├── .zattrs        

tischi avatar Apr 23 '21 17:04 tischi

I believe so though I don't think it's clearly stipulated. @DragaDoncila and @jni may already be doing this and can say more. I think the primary downside in the current spec is that if you do that, it would be difficult to add the image back into the same fileset at a later date. Of course, if you're going to use the (future) remote links (https://github.com/ome/ngff/issues/13) then it would be fine.

joshmoore avatar Apr 24 '21 09:04 joshmoore

Sorry for the delayed reply on this! You can indeed store label files exclusively. We were doing this more than 6 months ago now, so the metadata structure may have changed, but we were storing a multiscale label image without the labels subdirectory, specifically:

└── label_image.zarr                 
    │
    └── 0
    │
    └── 1
    |
    └── ...
    │
    ├── .zgroup
    │
    ├── .zattrs 

With .zattrs specifiying the `"multiscales" and "image-label" members.

DragaDoncila avatar Apr 28 '21 20:04 DragaDoncila

Thanks @DragaDoncila! @joshmoore so the labels sub-directory is not mandatory?

tischi avatar Apr 29 '21 07:04 tischi

For an image to be a label, no. For an image to have labels, currently yes.

joshmoore avatar Apr 29 '21 07:04 joshmoore