The napari hub is transitioning to a community-run implementation due to launch in June 2025.
Since October 1, 2024, this version is no longer actively maintained and will not be updated. New plugins and plugin updates will continue to be listed.

napari-tracks-reader

napari-tracks-reader

Read tracks from txt (xml, csv) files to napari

This plugin allows to open particle tracking results from multiple formats into the Napari Tracks Layer.

The formats currently supported by this plugin are:

CSV

The most basic format to store particle tracking tracks is a CSV file containing the tracks table. In this format each line is a particle and each column a property of the particle. The table headers must be TrackID, t, x, y, z. Note that the header order does not matter:

TrackIDtxyz
01641.582834334886847.5059300200816640
01741.4842527053831751.60238355970570

The raw CSV file is a classical comma-separated values format:

TrackID,t,x,y,z
0,16, 41.5828343348868, 47.505930020081664, 0
0,17, 41.48425270538317, 51.6023835597057, 0
...

[!NOTE] This CSV format does not support split and merge events

TrackMate

The TrackMate format is the XML model file générated by the TrackMate Fiji plugin. The XML file from TrackMate should not be manually modified and and contains a Model element:

<?xml version="1.0" encoding="UTF-8"?>
<TrackMate version="6.0.2">
...
<Model spatialunits="pixel" timeunits="sec">
    <FeatureDeclarations>
      <SpotFeatures>
        <Feature feature="QUALITY" name="Quality" shortname="Quality" dimension="QUALITY" isint="false" />
        <Feature feature="POSITION_X" name="X" shortname="X" dimension="POSITION" isint="false" />
...

All the particles features from the TrackMate model file are loaded in the napari tracks properties.

[!NOTE] This format supports split and merge events

Icy

The Icy format is a XML file generated by the Icy software. The XML file from ICY should not be manually modified and starts with the root element:

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <trackfile version="1" />
  <trackgroup>
    <track id="265713726">
      <detection t="16" x="41.5828343348868" y="47.505930020081664" z="0" classname="plugins.nchenouard.particleTracking.sequenceGenerator.ProfileSpotTrack" type="1" />
      <detection t="17" x="41.48425270538317" y="51.6023835597057" z="0" classname="plugins.nchenouard.particleTracking.sequenceGenerator.ProfileSpotTrack" type="1" />
      ...

[!TIP] This format supports split and merge events

ISBI

The ISBI format is a XML format used for the ISBI tracking challenge. This format must contain a root element and a list of particles in a TrackContestISBI2012 element:

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <TrackContestISBI2012 snr="?" density="?" scenario="FakeTracks.tif" generationDateTime="Wed May 12 14:07:09 CEST 2021">
    <particle>
      <detection t="0" x="64.00558680057657" y="3.9587411612103076" z="0.0" />
      <detection t="1" x="63.98171495578894" y="6.04150382894106" z="0.0" />
      <detection t="2" x="63.95406806092088" y="10.06085170348766" z="0.0" />

[!NOTE] This format does not support split and merge events

You can open local tracks using napari at the terminal and the path to your file:

$ napari /path/to/your/tracks.xml

OR in python:

import napari

viewer = napari.Viewer()
viewer.open('/path/to/your/tracks.xml')
napari.run()

If you discover a bug with the plugin, or would like to request a new feature, please raise an issue on our repository at https://github.com/sylvainprigent/napari-tracks-reader.

Version:

  • 0.1.3

Last updated:

  • 26 May 2021

First released:

  • 11 May 2021

License:

Supported data:

  • Information not submitted

Plugin type:

Open extension:

GitHub activity:

  • Stars: 7
  • Forks: 2
  • Issues + PRs: 1

Python versions supported:

Operating system:

Requirements:

  • napari-plugin-engine (>=0.1.4)
  • numpy
  • pandas (>=1.2.4)