Recently I’ve been working on projects involving heavy usage of particle tracking. There are many available solutions to do that, but since I’m a big fan of ImageJ/FIJI, I’m sticking to it. Among multiple plugins for tracking there are two best options (in my opinion): TrackMate for the automatic tracking and MTrackJ for the manual and track editing/visualization.
There are a couple of reasons, why I don’t use TrackMate alone:
2) There are more options for track visualizations in MTrackJ (transparency, show only points till current time, track point marker size and shape, etc). Well, maybe not more, but they are different.
3) File format of MTrackJ is plane text, while TrackMate uses XML. I must note that the parsing of XML in Matlab (using standard library) takes painfully long time for big files ( file size > a couple of megabytes).
The last point is especially annoying if I have about hundred megabytes per only one experimental condition.
The list of “why I don’t use MTrackJ alone” is very short, but convincing: because it is not a tool for an automatic tracking.
I came up with two possible solutions: either re-write Matlab import script using Java XML stream libraries (I promise I’ll do that in the future) or write a converter from XML to MDF (MTrackJ format file). And further import MDF file to Matlab, since its format is quite straightforward. Since I’m using MTrackJ to control/examine/edit tracking results from TrackMate anyway, I decided to go with the second option.
So here is converter from TrackMate to MTrackJ.
And Matlab import function for tracks stored as mdf files.
I must note that the converter works only with”linear”, non-splitting tracks, since it is the only one supported by MTrackJ.