getting started
This document will help you get up to speed on installing and running the toolbox.
[[TOC]]
- Download the latest version of the toolbox from the Releases page.
- Open the toolbox files (*.mltbx). Your system should prompt you to open the files with MATLAB. Select Install.
(Optional) If MATLAB did not launch automatically, try the following steps:
- Launch MATLAB
- In MATLAB, navigate to the folder where the downloaded toolbox is saved
- Open the toolbox by double-clicking the file in the Current Folder panel then select Install.
You can check that the toolbox was correctly installed by clicking on Add-Ons > Manage Add-Ons in the Home tab. The Linear Assignment Tracking toolbox should appear on the list.
To uninstall the toolbox:
- Open the Add-Ons manager by clicking on Add-Ons > Manage Add-Ons in the Home tab
- Find the toolbox, and click on ⋮ (vertical ellipsis) to show more options. Select open folder and note the folder location.
- Again, click on ⋮ (vertical ellipsis) to show more options and select uninstall.
If you encounter a message saying the some files remain after uninstalling, remove the remaining files by:
- Closing MATLAB
- Navigate to the
Add-Ons/Toolboxes
folder (the parent folder from step 2 above) and delete the folder containing the remaining files. The folder should be named after the toolbox.
The default location of the Add-Ons directory is listed here. Alternatively, you can look up the location by clicking on Preferences in the home tab, and then selecting MATLAB > Add-Ons.
A typical image analysis pipeline has the following steps:
graph LR
A[Read image] --> B[Segment objects] --> C[Track objects] --> D[Analyze data]
The code in this toolbox helps with the last two steps (tracking objects and analyzing data). In code, the process would look something like:
%Initialize the LAPLinker object
linker = LAPLinker;
%Adjust properties as necessary
linker.LinkedBy = 'Centroid'; %Link objects by position
linker.LinkCostMetric = 'euclidean' %Compute straight-line distance
linker.LinkScoreRange = [0, 50]; %Link objects within 0 - 50 pxs
for frame = 1:numFrames
%Read in current frame
I = imread('timelapse.tif', frame);
%Generate a mask of bright objects
mask = imbinarize(I);
%Measure data using regionprops
data = regionprops(mask, 'Centroid', 'Area');
%Link objects
linker = assignToTrack(linker, frame, data);
end
%Get the TrackArray for data analysis
trackData = linker.tracks;
Note: LAPLinker
was written to be compatible with the output of MATLAB's built-in
regionprops
function, i.e. data to be tracked should be a structure array (struct
).
- Read an overview of the tracking algorithm
- Work through an example tracking cells in a time-lapse image.
- Learn more about features of the toolbox in the User Guide.
If you need additional help using the toolbox, please contact us at biof-imaging@colorado.edu.