|
35 | 35 | # Some of the parameters we configure below need to have |
36 | 36 | # a reference to the model at creation. So we create an |
37 | 37 | # empty model now. |
38 | | - |
39 | 38 | model = Model() |
40 | 39 |
|
41 | 40 | # Send all messages to ImageJ log window. |
42 | 41 | model.setLogger(Logger.IJ_LOGGER) |
43 | 42 |
|
44 | 43 |
|
45 | | - |
46 | 44 | #------------------------ |
47 | 45 | # Prepare settings object |
48 | 46 | #------------------------ |
|
73 | 71 | # yield numerical features for the results, such as speed, mean intensity etc. |
74 | 72 | settings.addAllAnalyzers() |
75 | 73 |
|
| 74 | +# The line above is VERY IMPORTANT if you want to filter spots or tracks. |
| 75 | +# By default the TrackMate settings do not include feature analyzers, and the |
| 76 | +# objects you will get from tracking will only include the very minimal |
| 77 | +# feature set needed for TrackMate to operate. This might be advantageous |
| 78 | +# if you want to go fast. If you want however to compute specific features and / or |
| 79 | +# filter spots based on these filters, you need to explicitely include the corresponding |
| 80 | +# analyzer into the settings object. Filtering will not work without that. For instance, |
| 81 | +# if you try for to filter spots with a feature that was not calculated by an analyzer, |
| 82 | +# you will have 0 spots after filtering. |
| 83 | +# With `settings.addAllAnalyzers()` we simply add all the analyzers that TrackMate |
| 84 | +# can find. Since they are relatively fast, this is a convenient method. |
| 85 | + |
76 | 86 | # Configure track filters - We want to get rid of the two immobile spots at |
77 | 87 | # the bottom right of the image. Track displacement must be above 10 pixels. |
78 | | - |
79 | 88 | filter2 = FeatureFilter('TRACK_DISPLACEMENT', 10, True) |
80 | 89 | settings.addTrackFilter(filter2) |
81 | 90 |
|
|
0 commit comments