Skip to content

overview trackarray

Jian Tay edited this page Apr 11, 2020 · 1 revision

Overview of TrackArray

TrackArray is a data class representing an array of tracks containing timeseries data from the LAPLinker class . Each track is modelled as a binary linked list, where each "mother" track is connected to two "daughter" tracks. The data class is built to be extensible to enable custom data structures.

This data class is designed to be used LAPLinker.

Glossary

  • Tracks represent the data connected to individual objects across every frame of the timelapse video.
  • Track ID is a unique identifier (number) that is assigned to a track when it is created. For most functions, this is the identifier that should be used to refer to a track.
  • A TrackArray object is a concrete realization (instant) of the TrackArray class. For example:
    TA = TrackArray;
    TA will be a TrackArray object.

Example data

For this document, we will define the following example data

%Define an example dataset with two objects
dataIn.Length = 10;
dataIn.PxIdxList = [10 20 40 100];
dataIn.Color = 'Blue';

dataIn(2).Length = 5;
dataIn(2).PxIdxList = [8, 16, 2];
dataIn(2).Color = 'Yellow';

%Assign the test data to a TrackArray using LAPLinker
L = LAPLinker;
L = assignToTrack(L, 1, dataIn);

%Get the TrackArray
TA = L.tracks;

Retrieve track data

Track data can be retrieved from the TrackArray object using the method getTrack.

>> track2 = getTrack(TA, 2)
track2 = 
  struct with fields:

            ID: 2
      MotherID: NaN
    DaughterID: NaN
        Frames: 1
        Length: 5
     PxIdxList: [8 16 2]
         Color: {'Yellow'}

You can access individual data fields using standard dot notation.

trackLen = track2.Length;

Plotting track relationships

TrackData includes a method to generate tree plots.

Clone this wiki locally