Closed tischi closed 3 years ago
I could imagine that when we would like to support images with overlapping objects (e.g. using the ImgLib2
ImgLabelling
), then the labels could actually be text and not numbers.
Yes, that part makes sense.
The alternative is that I do special stuff to remove trailing zeros when converting the label_id to a string.
Always ensuring that things are stored as int is a bit tricky on the python side. So I would prefer if you could add some logic here, that trys to cast the label_id to an int before converting to the "LABEL_ID-IMAGE_ID-[TIMEPOINT]" identifier.
Ok, but them should I assume that label_ids are always integers?
As said above this may not be the case.
Maybe I could do something like: if ( canBeParsedAsInteger(...) ) {}
I am hard-coding for now that the label ids can be parsed to Double. This is also what we assumed before.
I am hard-coding for now that the label ids can be parsed to Double. This is also what we assumed before.
Ok, I think that is a good solution for now and we can revisit this if the case of string ids comes up. I will close this issue for now, feel free to reopen if something is not addressed yet.
@constantinpape
Right now in the zebrafish example (new-table-spec) the image segment label IDs in the default table read "1.0" whereas in the other tables they read "1" (no floating point).
This right now leads to a crash when trying to merge the tables because the strings do not match.
This used to work, because I used to compared the Double values. But now for dealing with the multiple sources I have to match the concatenated label_id_image_id, which is a String and then I get an error.
I could imagine that when we would like to support images with overlapping objects (e.g. using the ImgLib2
ImgLabelling
), then the labels could actually be text and not numbers. Thus, ideally I would like to require that, even though it currently is a number, that the actual strings to represent the numbers in the table MUST match.The alternative is that I do special stuff to remove trailing zeros when converting the label_id to a string.
What do you think?
cc @jhennies @K-Meech