Displaying the Tracks
Previous (Tracking Neutrophils with Matlab 2) / Index / Next (Tracking Neutrophils with Matlab 4)

Tracking Neutrophils with Matlab: 3


  • Displaying the Track

Displaying the Tracks

In many cases it is better to display the tracks so that the user can visualise the outcome of the tracking process. This not only helps to validate the tracking process, but also to be able to visualise many inherent characteristics of the migration process for that particular dataset.

Measurements can be extracted directly from the handles, but this requires some knowledge of matlab but the field handles.distanceNetwork contains a summary of many measurements:

disp (handles.distanceNetwork)

        perHop: [8x15 double]
        numHops: [9 9 9 9 9 9 9 9 9 9 9 9 9 9 4]
    totPerTrack: [1x15 double]
    maxPerTrack: [1x15 double]
     avPerTrack: [1x15 double]
     biasedMean: 0.4367
      biasedStd: 0.2431

handles.distanceNetwork.perHop is a matrix where the distance of every "hop" (that is the movement of an individual neutrophil from frame to frame) is stored, it follows the same structure as finalNetwork.

handles.distanceNetwork.numHops records the number of hops of each track

handles.distanceNetwork.totPerTrack, maxPerTrack and avPerTrack contain the total distance, maximum distance of one hop and average hop distance per track.

To plot the tracks you can use the command "plotTracks". For example to plot all the tracks in [X, Y, Z] use:


"view" sets the angle of view since these are 3D plots. To plot in [X,Y,time] where the z axis is time and grows upwards use:


"clf" clears the previous plot before plotting the next one. You can select which tracks to plot, or only a subset, the large ones, for instance

plotTracks(handles,2,[1 4 9]);

selects only the tracks [1, 4, 9] or to select those that have more than 5 hops in length:


These are 3D plots, you can rotate them with the mouse or through the command line:


Previous (Tracking Neutrophils with Matlab 2) / Index / Next (Tracking Neutrophils with Matlab 4)