1+ # Prerequisites before running this script in Fiji:
2+ #
3+ # - Open the blobs image, e.g. using Ctrl + Shift + B.
4+ # - Drag and drop this script and run it in Fiji.
5+ #
6+ # Expected result: a label image named "LblImg_blobs.gif" opens next to the raw
7+ # blobs.gif with many segmented spots (LoG detector). With the Cellpose detector
8+ # the segmented blobs should be quite accurate; the LoG detector finds many spots
9+ # across the image.
10+
11+ from imcflibs .imagej import trackmate
12+ from ij import IJ
13+
14+ imp = IJ .getImage ()
15+
16+ # Select the trackmate LoG detector:
17+ settings = trackmate .log_detector (imp , 5 , 1 , 0 )
18+
19+ # Alternatively, use the Cellpose or StarDist detector:
20+ # settings = trackmate.cellpose_detector(imp, "S:\cellpose_env", "NUCLEI", 23.0, 1, 0)
21+ # settings = trackmate.stardist_detector(imp, 1)
22+
23+ # Manual tracker addition, run_trackmate does this otherwise:
24+ # settings = trackmate.sparseLAP_tracker(settings)
25+
26+ # Spot and track filtering:
27+ # settings = trackmate.spot_filtering(settings, None, 1.0, None, None)
28+ # settings = trackmate.track_filtering(settings, 15.0, 15.0, 3, 1, 1)
29+
30+ res_img = trackmate .run_trackmate (imp , settings )
31+ res_img .show ()
0 commit comments