Add unit to the fcsv header

While we complain that formats like OBJ and STL suffers from lack of explicit unit size description, a similar problem exists for fcsv and as mrk.json as far as I can tell. There is no field which tells what the reported units are in. It appears that changing the default unit to something like micron doesn’t seem to have an effect on the output. Is it always assumed that the values will be written as millimeters? Is this going to cause precision issues when units are more widely supported and used?

Should we consider adding a unit tag to outputs of markups for the sake of completeness?

I agree, length unit must be saved into markups file.

I guess it is not as a big problem for markups as for images and meshes, because markups rarely interpreted on their own and so the unit can be taken from the associated input data.

I will add this to the json format, but I would not touch the fcsv export, as it could break existing parsers that just ignore the first N lines of the file.

1 Like

Yes, I was worried about breaking the existing parsers, but we have done quite a bit of breaking free from previous versions (such as coordinate changes for models etc). Can’t we find a solution that will support the units in fcsv, at least going forward?

In my field it is actually the landmarks that will get published and distributed as part of the results. So the dependency of needing to have the original data to figure out the unit would be concerning…

Added a ticket to make sure saving of “length” unit will get implemented: https://github.com/Slicer/Slicer/issues/5261

2 Likes