Skip to content

Commit a70988c

Browse files
authored
Merge pull request #75 from lguerard/issues/36
Fix issues with TrackMate
2 parents 9fba2b6 + 43b2352 commit a70988c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/imcflibs/imagej/trackmate.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@
88

99
from fiji.plugin.trackmate import Logger, Model, SelectionModel, Settings, TrackMate
1010
from fiji.plugin.trackmate.action import LabelImgExporter
11+
from fiji.plugin.trackmate.action.LabelImgExporter import LabelIdPainting
1112
from fiji.plugin.trackmate.cellpose import CellposeDetectorFactory
1213
from fiji.plugin.trackmate.cellpose.CellposeSettings import PretrainedModel
1314
from fiji.plugin.trackmate.detection import LogDetectorFactory
1415
from fiji.plugin.trackmate.features import FeatureFilter
1516
from fiji.plugin.trackmate.stardist import StarDistDetectorFactory
1617
from fiji.plugin.trackmate.tracking.jaqaman import SparseLAPTrackerFactory
17-
1818
from ij import IJ
19-
2019
from java.lang import Double
2120

2221
from .. import pathtools
@@ -347,7 +346,7 @@ def run_trackmate(
347346

348347
if not settings.trackerFactory:
349348
# Create a Sparse LAP Tracker if no Tracker has been created
350-
settings = sparseLAP_tracker(settings)
349+
settings = sparse_lap_tracker(settings)
351350

352351
ok = trackmate.checkInput()
353352
if not ok:
@@ -376,9 +375,10 @@ def run_trackmate(
376375

377376
exportSpotsAsDots = False
378377
exportTracksOnly = False
378+
labelIdPainting = LabelIdPainting.LABEL_IS_TRACK_ID
379379
# implus2.close()
380380
label_imp = LabelImgExporter.createLabelImagePlus(
381-
trackmate, exportSpotsAsDots, exportTracksOnly, False
381+
trackmate, exportSpotsAsDots, exportTracksOnly, labelIdPainting
382382
)
383383
label_imp.setCalibration(cal)
384384
label_imp.setDimensions(dims[2], dims[3], dims[4])

0 commit comments

Comments
 (0)