Kapoorlabs-CAPED / NapaTrackMater

Napari Visualization tool for Trackmate > 6.0 and bTrackmate XML files for 2/3D + time tracks. Available via pip package napatrackmater.
https://pypi.org/project/napatrackmater/
BSD 3-Clause "New" or "Revised" License
16 stars 4 forks source link

export track vertices as csv for napari #2

Closed erjel closed 3 years ago

erjel commented 3 years ago

Hi,

sorry that I interrupt again...

I played a little around with the function ImportTrackmateXML and found that the tracks should be exported to a csv-File.

The file, however, only contained a single line (since Tloc, Zloc, etc. are initialized in every loop).

By reordering the lines, the csv file now contains a complete array of track infromation which is directly usable in napari:

import numpy as np
tracks = np.genfromtxt(<savedir/TrackMate{Name}.csv>, delimiter=',', skip_header=1)
viewer.add_tracks(tracks)

Best wishes,

Eric

kapoorlab commented 3 years ago

Excellent Eric, thank you so much for your feedback and help!