Retriving "NUMBER_SPLITS" in TrackMate

Dear all,

I’m really struggling to figure out how to get features such as “NUMBER_SPLITS” from TrackMate.

model.getFeatureModel().getTrackFeature(id, TrackBranchingAnalyzer.NUMBER_SPLITS) does NOT work.

Any suggestions?

Thank you.

Best,
Nicola

Hi @Nicola_Zilio

It should normally.
I would look into possible places:

  • Make sure that the id actually corresponds to a track id. Track Ids can look like random integer numbers, they are not to be confused with track index.
  • Earlier in your code, make sure you did configure TrackMate to use the TrackBranchingAnalyzer. If you use TrackMate outside the GUI, by default it computes nothing and returns null to all feature request.

@tinevez possibility number 2 was the issue. I added settings.addTrackAnalyzer(TrackBranchingAnalyzer()) to the code and now it works.

Thanks a lot.

Nicola