mastodon-sc / mastodon

Mastodon – a large-scale tracking and track-editing framework for large, multi-view images.
BSD 2-Clause "Simplified" License
69 stars 20 forks source link

Better track coloring #347

Closed tinevez closed 2 weeks ago

tinevez commented 2 weeks ago

Prior to this PR, the track color was determined by the position of a track in the sorted track array, based on the root labels.

In practice, for large number of tracks, this was not so great when editing tracks a lot. Indeed, the slightest track addition of link removal could completely change the order, hence the track coloring.

Here we simply use the hash of the root label of a track to determine its color, making it independent of the other ones. The color of a track now only depends on the label of its root.