ome / ngff

Next-generation file format (NGFF) specifications for storing bioimaging data in the cloud.
https://ngff.openmicroscopy.org
Other
115 stars 38 forks source link

Specification for extensions #68

Open unidesigner opened 2 years ago

unidesigner commented 2 years ago

It would be nice to have a field to specify custom extension attributes that may be specific to certain reader tools.

And a comment regarding extensions. I don't have much experience on how to do this properly, but I was just simply thinking of another metadata field like extension with keys referring to a tool or library, e.g. tensorstore, and therein an arbitrary dictionary that the tool/library knows how to parse. e.g.

{
'extension': {
 'tensorstore': {
   'voxel_offset': [0, 42, 84]
 }
}
will-moore commented 2 years ago

This is similar to the way that we use "properties":{} to store user-defined values for labels (https://ngff.openmicroscopy.org/latest/#label-md).

And the same idea was discussed in https://github.com/ome/ngff/issues/31, using properties dict at various places to store custom data at the image level or at the group/collection level. (having "properties":{} at multiple places in the spec for different granularities). But this is still just at the discussion stage.

So, I guess we first need to agree on a term (extension, properties, attributes etc) and then decide where in the spec we want it?

joshmoore commented 2 years ago

So, I guess we first need to agree on a term (extension, properties, attributes etc) and then decide where in the spec we want it?

With the caveat that if we decide to use JSON-LD the extension mechanism is "built-in", except perhaps where we want to link to bulk and/or binary properties which will need some consideration.

{
  "@context": {
    "ngff": "https://ngff.openmicroscopy.org",
    "ext": "https://example.com/some-extension"
  }
  "ngff:multiscale": ...
  "ext:foo": ["something-else", "about-this-image" ]
}