Clarify difference between image-label properties and colors
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 171
- Forks
- 75
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 20
Description
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 object
"image-label":
{
"properties": [
{ "label-value": 1, "name": "liver", "color": "0000FF", "opacity": 0.5, "area (pixels)": 1200, "class": "foo" },
{ "label-value": 4, "name": "tumor", "color": "00FF00", "opacity": 1.0, "area (pixels)": 1650 },
...
]
},
"source": {
"image": "../../"
}
Option B. Move properties under a few objects, such as properties and display; or properties, display, and measurements.
"image-label":
{
"version": "0.4",
"properties": [
{ "label-value": 1, "name": "liver", "area (pixels)": 1200, "class": "foo" },
{ "label-value": 4, "name": "tumor", "area (pixels)": 1650 },
...
],
"display": [
{ "label-value": 1, "color": "0000FF", "opacity": 0.5 },
{ "label-value": 4, "color": "00FF00", "opacity": 1.0 },
...
]
},
"source": {
"image": "../../"
}
or
"image-label":
{
"version": "0.4",
"properties": [
{ "label-value": 1, "name": "liver" },
{ "label-value": 4, "name": "tumor" },
...
],
"display": [
{ "label-value": 1, "color": "0000FF", "opacity": 0.5 },
{ "label-value": 4, "color": "00FF00", "opacity": 1.0 },
...
],
"measurements": [
{ "label-value": 1, "area (pixels)": 1200, "class": "foo" },
{ "label-value": 4, "area (pixels)": 1650 },
...
]
},
"source": {
"image": "../../"
}
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the linked NGFF image-label specification and compare its current colors/properties structure with Options A and B in the issue. Resolve which grouping and color representation should be adopted, then update the specification; no repository files, tests, or entry points are identified in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100