Error in generating and reading TrackMate xml file

Dear Dr. Tinevez,

I have just started using TrackMate to analyze time-lapse images of cell migration experiments. TrackMate is a great took! I appreciate very much you and your colleagues to create and maintain the tool.

Now, I face a problem during loading an .xml file into Matlab using a function provided, which seems difficult to sort out on my own. It would be grateful if you could give me some advice.

This is my second set of analyses. My first analysis went well - I could load an output xml file into Matlab and handle the data values of a total of 107 tracks for visualization. This time, I edited and selected a total of 171 tracks and created an output xml file. When I execute the following code in Matlab

tracks = importTrackMateTracks(file_path_tracks);

This gives me error messages;

dot indexing not supported for this type of variable
Error: importTrackMateTracks (line 121)
t = str2double(detectionNode.getAttribute(‘t’));

I found that the error occurred in Parse section in importTrackMateTracks.m when i=101 or larger.

So I removed the 101st track to the 171st track from the xml file and tried to load into Matlab, the error did not occur. I then created and tried to load an xml file consisting of the 101st to the 171st track, the error occurred.

This is where I am stuck at the moment, and could you please let me know if you could notice anything in my procedure.

Another issue I noticed is that the ‘t’ value doesn’t start with the minimum value of the time point of the track. For example, in the 102nd track, it goes as follow;


This particularly happens after the 100th track. I guess it is just that the last time point comes up at the first, and doesn’t influence subsequent analysis. Also, the number of ‘nSpots’ looks incorrect after the 101st track. Would it cause the trouble??..

My computing environment is
MacBook Pro(2015), MacOS 10.14.5
Matlab 2017b
Fiji Ver 2.0.0-rc-69/1.52n
TrackMate Ver 3.8.0
Analyzing image: a time-lapse consisting of 96 frames

and several files relevant to the issues raised above are attached.
Should you need any further information and files, I would be happy to send you.

Many thanks again.

Best regards,

2nd_track1-100(working).xml (463.6 KB) 2nd_track1-171(notworking).xml (753.5 KB) 1st_track1-107(working).xml (438.2 KB) 2nd_track101-171(notworking).xml (273.7 KB)

Hello @eijiro

I have found the source of error. For some reason, in the XML you sent and that are not working, the number of spots in a track declared in the track header, and the actual number of detection elements differ. For instance, I can have

<particle nSpots="88">

but this track will have only 75 detection lines.

I don’t know how it happened. Did you play with the files themselves?

I am also getting the same error. I did not manipulate the xml file and am using it as exported from Fiji. I am actually following the example given in the trackmate manual tutorial and still having this issue.

Hi @tinevez

Thanks for checking my data!
No, I did not touch the content of the xml file. The content is exactly the same with the one saved from TrackMate (as @ewasson1).

I think you picked up the 101st track as an example. I found in a csv file from the same analysis that FRAME and POSITION_T doesn’t match (they should match as frameinterval = 1) (see TRACK_ID 256 in the attached csv file). From 81st frame, time becomes 0.
In the csv file, the total number of the spot is 96. The number of the spot with POSTION_T assigned is 81. So TrackMate xml doesn’t reflect either number in its nSpot in this track.

At the moment, I continue to analyze the data with csv file on Matlab.
2nd_allTracks.csv (1.5 MB)

I strongly suspect a bug that will be delightful to squash.

Could you send me the image with the exact parameters to reproduce the error you get?
Ideally the one with the least tracks

My issue is similar, but not quite the same. The FRAME and POSITION_T values match up, however, they are not sequential (1, 2, 3,…). For TRACK ID = 0, FRAME and POSITION_T values are repeated twice (0, 0, 1, 1…) therefore the number of detection elements (49) does not match up with the number of nSpots (99) in the xml file. I am following the tutorial in the TrackMate documentation, but can attach the figure and parameters I used here if need be. Thank you!

Tracks.csv (25.7 KB)

Yes please, I would need the figure and parameters.
Thank you!

Could I send a link to the files to your email? I a bit hesitate to open the image files to public in here.

I understand, but this forum only offers public support. Please check with your lab if it is ok to post them here or if we can reproduce the bug with other images.

I have attached the image below. I used the DoG detector with a estimated blob diameter of 5.0 pixels and threshold of 0.0 with sub pixel localization. No initial thresholding was done. A mean intensity filter was used to filter the spots with a min value of 33. I used the LAP tracker and allowed track segment gap closing (max frame gap of 2), splitting, and merging all with a 15.0 pixel max distance. I did not use any feature penalties. Lastly, I filtered the tracks using track displacement with a value of 20.10.

Thanks so much for your help!

FakeTracks.tif (806.2 KB)

One additional note…I am wondering if it is a mac issue. I am also using a mac and a colleague of mine who is using windows exported her data to an xml file with no issues (frame and position_t values were correct). I was then able to import that into matlab without the error.

I could not find a bug.

In the example you gave me you use splitting and merging. As soon as a you have a track that is a linear track (no branching at all, no merging at all) then the export to the simplified XML does not work.