Open lassoan opened 2 years ago
Thanks for the suggestions.
I think the current state was influenced by napari
labels.
The distinction is really between key words defined by the spec, and user-defined (custom) "properties".
All the user-defined custom attributes are grouped under properties
but all the values defined by the spec go at the top-level. So far the only key-word defined by the spec is colors
, but we'd expect others to be added in the same place.
This concept is most similar to your first B suggestion, except the spec-defined properties in future may not necessarily be "display" properties.
We are planning to replace our previous text-based image label description format with a new json-based format for better interoperability. NGFF's
image-label
is simple and flexible enough, so we could use it.However, there is an odd separation of
colors
from all other properties.Some grouping of properties could make sense, for example separating display properties (color, opacity, fill opacity, border width, border opacity, etc.), content (name, standard terminology, etc.), and derived data (measurements, classification results, etc.). However, it is hard to find justification for just singling out color.
Would you consider the following options to improve this data structure?
Option A. Move all properties under a single
properties
objectOption B. Move properties under a few objects, such as
properties
anddisplay
; orproperties
,display
, andmeasurements
.or
Note that I've changed the color definition from
"rgba"=[255,255,255,255]
to"color": "0000FF"
match how it is defined elsewhere in NGFF.