trackmate-sc / TrackMate

TrackMate is your buddy for your everyday tracking.
https://imagej.net/plugins/trackmate
GNU General Public License v3.0
161 stars 75 forks source link

A tool to configure a sub-selection of feature analyzers. #261

Closed tinevez closed 1 year ago

tinevez commented 1 year ago

There is now a new 'plugin' that launches a configuration panel for the TrackMate feature analyzers.

It can be launched with the menu item: Edit > Options > Configure TrackMate feature analyzers.... and show this dialog:

Screenshot 2023-05-10 at 17 05 43

It allows selecting or deselecting feature analyzers. Upon pressing the Save to user defaults button, a JSON file is created:

❯ pwd
/Users/tinevez/.trackmate
❯ cat featureselection.json
{
  "allAnalyzers": {
    "spots": {
      "Manual spot color": true,
      "Spot 2D shape descriptors": true,
      "Spot 3D shape descriptors": true,
      "Spot contrast and SNR": false,
      "Spot fit 2D ellipse": true,
      "Spot fit 3D ellipsoid": true,
      "Spot intensity": true
    },
    "edges": {
      "Directional change": true,
      "Edge location": true,
      "Edge speed": true,
      "Edge target": true,
      "Manual edge color": true
    },
    "tracks": {
      "Branching analyzer": true,
      "Track duration": true,
      "Track index": true,
      "Track location": true,
      "Track motility analysis": true,
      "Track quality": true,
      "Track speed": true
    }
  }
}%                         

This selection will be used next time the user launches the TrackMate GUI. This allows skipping the computation of analyzers that the users do not need. This will become useful in particular for 3D analysis with segmentation, where iterating through all the pixels of all meshes might be very long.

However it brings a risk: because TrackMate does not manage dependencies, the user might remove an analyzer that is needed by another one (example: spot SNR requires spot intensity). This risk is not mitigated yet.