I aim to automatically track spots in relatively noisy time series, where:
I’d like to adjust the spot quality threshold in function of time, i.e. decrease the threshold for later time frames, when fluorophores are weaker due to bleaching.
I’d like to filter the spots with a given binary mask resulting from a previous segmentation. I tried to convert the mask into a
Roi, but because TrackMate uses
roi.getPolygon()(see this line), this approach won’t work when my mask results in a disconnected ROI (the polygon of an instance of
ij.gui.ShapeRoiis its bounding box, not the actual shape).
My approach would be to:
detect spots with a low threshold, then
filter the spots according to a combination of
Spot.QUALITYto achieve a “dynamic” threshold,
use a RandomAccess on my mask image to filter the spots if their x,y,z position corresponds to a masked image area
use the (Simple) LAP Tracker on my custom-filtered spot collection to generate my final tracks.
While I know more or less how to achieve steps 1-3 above to get the desired spot collection, I’m unsure on how to best invoke the LAP tracker on this spot collection (step 4 above). I can create and process a new tracker instance like this:
SpotTracker tracker = new SparseLAPTracker( spotCollection, settings); boolean success = tracker.process()
But how can I get a list of spot IDs with linked track IDs from this?
I had the impression that the approach outlined on the Scripting TrackMate page doesn’t allow for enough flexibility to do what I want.
@tinevez et al: would you have some examples of doing this? or some other comments on the sketched workflow?