Closed funkey closed 6 years ago
Hummm the IDs get converted to double
(or float64
?) normally, so we normally have access to the whole range of int
s. Do your IDs go beyond 2 billions?
Hi @tinevez, yes the ids are above 2bio, as shown in the example above where they are at 19bio. Is that illegal? I.e. how hard is it to use long for the ids instead of doubles?
I think I would have to rewrite the TrackMate model, because all ids are int :(
And I am afraid we did not attend to that problem in Mastodon, where we have this cap too.
Am I correct @tpietzsch ? I seem to remember you discuss using long
instead of int
in another use of mastodon-collection
discussing with Philip/
It should be easy to handle IDs as long
. These are anyway just IDs from the file that are only used to establish identity for linking the spots. They are lost in the imported model. (You can add a new property if you want to preserve them.)
To change to long
when importing, you would need to change this,
https://github.com/fiji/TrackMate3/blob/4cec44c1e7a3183855d29d744fe65886692b4366/src/main/java/org/mastodon/revised/model/mamut/trackmate/TrackMateImporter.java#L219
this
https://github.com/fiji/TrackMate3/blob/4cec44c1e7a3183855d29d744fe65886692b4366/src/main/java/org/mastodon/revised/model/mamut/trackmate/TrackMateImporter.java#L241
etc.
Accommodating > 2bio spots in total is a bigger task. But doesn't look like this is required here?
just to clarify: I'm talking about Mastodon. Not sure what would need to happen in MaMuT.
For MaMuT and TrackMate I made the mistake of indexing spots in lists. So their max number is bound by int values :/
So yes I would go to Mastodon which in my humble opinion is superior.
Actually we also use int
IDs in Mastodon. See:
https://github.com/bigdataviewer/mastodon-graph/blob/master/src/main/java/org/mastodon/graph/GraphIdBimap.java
Yes, as I said accommodating > 2bio spots is a bigger task. But supporting long IDs in imported XML files is easy. They will anyway get new internal IDs assigned. It's just about making sure the long IDs survive until the import is complete (which is easy).
I am closing this issue for now, as MaMuT will not be able to harness it.
When I tried to open an annotation XML created by another script (i.e., not by manual annotations within MaMuT), only one "Spot" per frame was shown, although the XML file contains a few hundred per frame. The problem seems to be the use of large IDs. My annotation XML contains spots with:
By changing the IDs to
I can see all spots as expected. I suspect that somewhere during reading of the XML, the IDs get converted to
float32
, causing collapsing of similar large values: