public interface TrackAnalyzer extends Benchmark, FeatureAnalyzer, MultiThreaded
Model
and their IDs. Therefore and
ideally, concrete implementations can be made stateless.
Note: ideally concrete implementation should work in a multi-threaded fashion for performance reason, when possible.
For TrackAnalyzer
s, there is a mechanism intended to maintain the
model integrity against manual, small changes. Something as simple as
removing a spot in the middle of a track will generate two new tracks, which
will invalidate all feature values for the old track. Analyzers are notified
of such events, so that they can recompute track features after the change.
A simple way would be to recompute all track features at once, but this might be too long and overkill for changes that do not affect all tracks (e.g. adding a lonely spot, or a new track is likely not to affect all tracks in some case).
So the process(Collection, Model)
will be called selectively on new
or modified tracks every time a change happens. It will be called from the
Model
after a Model.endUpdate()
, before any listener gets
notified.
Modifier and Type | Method and Description |
---|---|
boolean |
isLocal()
Returns
true if this analyzer is a local analyzer. |
void |
process(Collection<Integer> trackIDs,
Model model)
Compute the features of the track whose ID is given.
|
getProcessingTime
getFeatureDimensions, getFeatureNames, getFeatures, getFeatureShortNames, getIsIntFeature, isManualFeature
forbidMultithreading, getIcon, getInfoText, getKey, getName
getNumThreads, setNumThreads, setNumThreads
void process(Collection<Integer> trackIDs, Model model)
trackIDs
- the IDs of the track whose features are to be calculated.model
- the Model
from which actual tracks are to be
retrieved.boolean isLocal()
true
if this analyzer is a local analyzer. That is:
a modification that affects only one track requires the track features to
be re-calculated only for this track. If false
, any model
modification involving edges will trigger a recalculation over all the
visible tracks of the model.
Example of a local track feature: the number of spots in a track. It does not depend on the number of spots in other tracks.
Example of a non-local track feature: the rank of the track sorted by its number of spots, compared to other tracks.
Copyright © 2015–2021 Fiji. All rights reserved.