ParticleTracker - Tutorial
The ParticleTracker is an ImageJ Plugin for multiple particle detection and tracking from digital videos
Sample Data and Tutorial
This tutorial provides a basic introduction on how to select the right parameters for the algorithm of ParticleTracker and the right display and analysis options upon completion of it.
Written by Guy Levy and maintained by Janick Cardinale at the MOSAIC group, ETH Zurich
To use this tutorial you should already be familiar with ImageJ and have the plugin installed.
It is also recommended to read the user manual before starting.
In this tutorial we will guide you through an example using movies sample data:
- TransportOfEndosomalVirus.zip - a real experimental movie (image sequence) from Suomalainen et al., J. Cell Biol. 144 (4): 657-672
Kindly provided by the Cell Biology group, Institute of Zoology, University of Zurich.
Fast minus and plus end-directed transport of endosomal ts1 virus labeled with Texas red. Virus was added to TC7/MAP4/MTB-GFP cells and 72 TR-images were recorded with intervals of 1.5 s starting 20 min p.i.. The GFP signal is indicated at the beginning. Bar = 10 µm
- Artificial.zip - Artificial image sequence, will be used later in the tutorial for a specific example
Download the TransportOfEndosomalVirus.zip file.
Both the movies are actually sequence of separate image files (.tif) all in a zipped folder.
After downloading the zip file, unzip it to your preferred folder and Start ImageJ.
Load the image sequence by selecting the Import -> Image Sequence
from the File menu.
In the first shown dialog, select one of the images in the folder (the one you unzipped) and click "Open".
Use the second dialog to specify which images in the folder to open and/or to have the images converted to 8-bits.
When working with RGB images like the files of the experimental movie sample it is highly recommended to convert them to 8-bits. This way the memory consumption is reduced significantly.
Check the Convert to 8-bit Grayscale box and click OK.
IMPORTANT: Since the plugin also supports 3D images, it is necessary to correctly set the image properties. Select Image -> Properties... from the menu. Please verfiy that the number of slices (z) and the number of frames (t) are set correctly. For this tutorial, set the number of slices to 1 and the number of frames to 144.
Now, that the movie is open you can start the plugin by selecting ParticleTracker from the Plugins -> Particle Detector & Tracker menu.
The dialog showing now has 2 parts: Particle Detection and Particle Linking.
The parameters relevant for detection are:
In the particle detection part you can "play" with different parameter and check how well the particles are detected by clicking the preview detected button.
- Radius: Approximate radius of the particles in the images in units of pixels. The value should be slightly larger than the visible particle radius, but smaller than the smallest inter-particle separation.
- Cutoff: The score cut-off for the non-particle discrimination
- Percentile: The percentile (r) that determines which bright pixels are accepted as Particles. All local maxima in the upper rth percentile of the image intensity distribution are considered candidate Particles. Unit: percent (%)
There are no right and wrong parameters; it all depends on the movie, type of data and what is looked for.
Enter these parameters: radius = 3, cutoff = 0, percentile = 0.1(default) - click on preview detected.
Notice the 2 very close particles marked in the image
Check the detected particles at the next frames by using the slider in the dialog menu (you cannot move the image itself while the dialog is open)
With radius of 3 they are rightly detected as 2 separate particles.
If you have any doubt they are 2 separate particles you can look at the 3rd frame.
Change the radius to 6 and click the preview button.
Look at frame 1.
With this parameter, the algorithm wrongfully detects them as one particle since they are both within the radius of 6 pixels.
Try other values for the radius parameter.
Go back to these parameters: radius = 3, cutoff = 0, percentile = 0.1(default) - click on preview detected.
It is obvious that there are more 'real' particles in the image that were not detected.
Notice, that the detected particles are much brighter then the ones not detected.
Since the score cut-off is set to zero, we can rightfully assume that increasing the percentile of particle intensity taken will make the algorithm detect more particles (with lower intensity).
The higher the number in the percentile field - the more particles will be detected.
Try setting the percentile value to 2.
After clicking the preview button, you will see that much more particles are detected, in fact too many particles - you will need to find the right balance.
In this movie, percentile value of 0.6 will give nice results.
Remember! There is no right and wrong here - it is possible that the original percentile = 0.1 will be more suitable even with this film, if for example only very high intensity particles are of interest.
Set the parameters to radius = 3, cutoff = 1, percentile = 0.6 - click on preview detected.
Change the cutoff parameters back to its default (3) and click preview again.
Notice the particles marked in the two pictures:
With cutoff = 3 both particle are discriminated as non-particles and when cutoff = 1 only one gets discriminated.
The higher the number in the cutoff field the more suspicious the algorithm is of false particles.
This could be very helpful when one understand the method for non-particles discrimination as described in the original algorithm.
It can also lead to real particles discrimination when the value is too high.
After setting the parameters for the detection (we will go with radius = 3, cutoff = 0, percentile = 0.6) you should set the particle linking parameters.
The parameters relevant for linking are:
These parameters can also be very different from one movie to the other and can also be modified after viewing the initial results.
- Displacement: The maximum number of pixels a particle is allowed to move between two succeeding frames.
- Link Range: The number of subsequent frames that is taken into account to determine the optimal correspondence matching.
Generally, in a movie where particles travel long distance from one frame to the other - a large link range should be entered.
In this movie a link range of ~20 is appropriate. Set it to 20.
The linkrange value is harder to set before viewing some initial results since it is mainly designed to overcome temporary occlusion as well as particle appearance and disappearance from the image region and it is hard to notice such things at this stage.
Still an initial value has to be set, the default is 2 but we will continue with 3.
We will return to these parameters later with a different movie.
You can now go ahead with the linking by clicking OK.
The progress of the algorithm will be displayed in the main ImageJ Status Bar.
After completing the particle tracking, the result window will be displayed.
Click the Visualize all Trajectories button to view all the found trajectories.
This window displays an overview of all 110 found trajectories - it cannot be saved!
It is hard to make sense of so much information.
One way to reduce the displayed trajectories is to filter short trajectories.
Click on the Filter Options button to filter out trajectories under a given length.
Enter 144 and click OK. All the trajectories will disappear - you can also see the message in the results window "0 trajectories remained after filter".
Since the length of the movie is 144 frames there are no trajectories longer then 144 frames.
Filter again with 0 as input.
All trajectories are again displayed because by definition every trajectory length is at least 1 (spans over at least 2 frames).
Try other numbers for the filter option and notice the differences.
Set filter for 100, only 13 trajectories remained after filtering.
Select the yellow trajectory (the one shown here) by clicking it once with the mouse left button.
A rectangle surrounding the selected trajectory appears on the screen and on the trajectory column of the results window the number 32 is now displayed - it indicates the number of this trajectory (from the 110 found).
Now that a specific trajectory is selected you focus on it or get its information.
Click on Selected Trajectory Info button - the information about this trajectory will be displayed in the results window
Click on the Focus on Selected Trajectory button - a new window with a focused view of this trajectory is displayed.
This view can be saved with the trajectory animation through the File menu of ImageJ.
Look at the focused view and compare it to the overview window - in the focused view the white trajectory that is close to the yellow is not displayed.
The particle is displayed but the white trajectory animation is not.
This is because we selected Focus on Selected Trajectory.
Close this focus view.
Now we what to focus on area for number of trajectories view, we will focus on the area of the yellow and white trajectories as shown here.
Select a rectangle region of interest around these trajectories - click and drag the mouse on the overview to include them.
Click on the Focus On Area button - a new window with a focused view of these trajectories is displayed.
This time the animation of both trajectories is displayed.
Generally, any unfiltered trajectory part that is in the selected area will be shown.
You may notice that some particles are showing but their trajectory is not animated, this is because they are filtered (remember we filtered for longer then 100).
Close the focus window and reset the filter. You can do that by closing the overview window and reopening it by clicking the Visualize all Trajectories button or you can click the filter button and set the min length to 0 (default).
The last option is better since this way your area selection will stay.
Click again on the Focus on Area button - now all trajectories within the selection area is displayed.
The size of the focus window for specific trajectory and area focus is determined by the magnification factor relative to the original movie window size.
Select the pink trajectory (the one shown here). The trajectory number is 44.
Notice that the rectangle surrounding the selected trajectory is fairly big.
If we focus on this trajectory with the default magnification factor (6) a large window will be created and may cause memory problems (especially in Mac Os).
For this reason and others - you can change the magnification factor.
Before clicking the Focus on Selected Trajectory button - go to View Preferences menu in the results window and select the Magnification Factor option.
Select magnification of 2-4.
Click on the Focus on Selected Trajectory button to see the size of the new window. Close the window.
To explain the re-linking option we will use a different data sample - Artificial.zip.
Close all windows including the original movie window.
Load the new image sequence from Artificial.zip and start the plugin.
Set the particle detection parameters to: radius = 3, cutoff = 3.0, percentile = 0.9.
Set the particle linking parameters to: link range = 1, displacement = 10.
Start the algorithm and when it's done, click the View all Trajectories button.
Zoom in on the overview window for better view.
Select an area of interest to include the 2 adjacent blue and grey trajectories as shown here.
Increase the magnification factor to 8 and focus on that area.
Scroll through the focused view or view it with animation (Image -> Stacks -> Start Animation).
It seems that these two trajectories are actually 1 longer trajectory.
Why was it recognized as 2 trajectories? Scroll to slice/frame 71?
At this point, the detection algorithm, due to the set detection parameters and bad quality of the movie, did not detect the particle. This can also happen in real biological data.
Since the link range was set to 1 - the linking algorithm did not look ahead to frame 72 to check for a possible continuation to the trajectory.
Re-link the particle with link range = 2, go to the Relink Particles menu at the results window and select the set new parameters for linking.
In the dialog now opened - set the link range to 2 and click OK.
When the re linking is done, a message will be displayed in the results window:
Found 10 Trajectories
You can already see that fewer trajectories were found (10 instead on 17).
Click on the View all Trajectories button and compare the view to the one created with link range = 1.
Focus on the blue trajectory.
The previously 2 separate trajectories are now 1 and in frame 71, were the particle was not detected, a red line is drawn to indicate a "Gap" in the trajectory - meaning a part in the trajectory that was interpolated by the algorithm to handle occlusion, exit and entry of the particle.