Cytomine-ULiege / Cytomine-core

This repository hosts the legacy Cytomine-Core, which is the main web server implementing the Cytomine API. Our ULiège fork includes R&D experimental features. See @cytomine for official releases.
https://www.cytomine.org
Apache License 2.0
6 stars 6 forks source link

Header in annotation csv file indicates incorrect unit #27

Open waliens opened 2 years ago

waliens commented 2 years ago

I downloaded an annotation csv file from the "Annotations" panel.

The area column header indicates that the area and perimeter are in µm² and mm² respectively but the actual numbers are given in pixel² and pixel²/1000 when the related image has no resolution registered.

"ID";"Area (microns²)";"Perimeter (mm)";"Center X";"Center Y";"Image ID";"Image filename";"User";"Term";"Annotation thumb";"Annotation in Cytomine"
urubens commented 2 years ago

Hi, Thanks for reporting the issue.

I think we should add columns "Area unit" and "Perimeter unit", as unit can be different for annotations from different images. Are you sure for the factor 1/1000 for perimeter (and I guess you wanted to say mm and pixel for perimeter) ?

Possible values for "Area unit" would be: µm² when image resolution is set, pixel² otherwise. Possible values for "Perimeter unit" would be: mm when image resolution is set, pixel otherwise. We already have "areaUnit" and "perimeterUnit" as attributes in API endpoint annotation.json, so it will be easy to fix it :)

waliens commented 2 years ago

You are correct, i misread the header. It is indeed a perimeter in pixel.

I don't really know if it is a realistic use case at all but I think it would be great to have these information in both units (pixel²-pixel/µm²-µm) when the resolution is available, even if it means leaving the µm columns empty if no resolution is available for the image. Mixing different units in the same column might make analysis a bit more cumbersome afterwards.