Blob detection without trackmate or without performing cell tracking

segmentation
trackmate
Tags: #<Tag:0x00007fd6a083fb20> #<Tag:0x00007fd6a083f710>

#1

Hi everyone. I have created a script that uses Trackmate to perform segmentation (blob detection) and track cells over a image sequence.

However turns out Trackmate is not doing a great job on the tracking part so I’m now using a custom Matlab code to do this.

I want to get rid of the tracking performed by Trackmate and only keep the blob detection part. How can I do this? I want to keep the blob detection algorithm, it works a lot better than anything I tried. Performing tracking takes too much time and sometimes crashes the application due to lack of memory, when the sequence is too long, or when there are too many spots.

Is there a way to use Trackmate only for blob detection and not perform tracking?

Is there a way to use the same blob detection algorithm without using Trackmate?


#2

Hi @rafael.iriya

There is a ‘tracker’ in TrackMate that does nothing: the manual tracker:

Use it in your script by passing the factory to the Settings object.

Another way would be to simply call TrackMate.executeDetection().

Please tell us if it works!
best
jy


#3

Hi tinevez! Thanks a lot for replying!

The Manual track per se did not work, when I call trackmate.process() it crashes the application.

Trackmate.execDectection does work, but that’s the correct name not executeDetection.


#4

Ok most likely you have found a bug. I will investigate.
Can you please copy/paste the error here?


#5

Also it would help if you copy/pasted the script…
the GUI does not break.


#6
		model = Model()
		model.setLogger(Logger.IJ_LOGGER)
		model.getLogger().log(filename)
		
		imp = IJ.openImage(filename)	
		
#		imp.show()
	
		settings = Settings()
		settings.setFrom(imp)
		      
		# Configure detector
		settings.detectorFactory = DogDetectorFactory()
		settings.detectorSettings = {
		    DetectorKeys.KEY_DO_SUBPIXEL_LOCALIZATION : True,
		    DetectorKeys.KEY_RADIUS : 5.0,
		    DetectorKeys.KEY_TARGET_CHANNEL : 1,
		    DetectorKeys.KEY_THRESHOLD : qualityThres,
		    DetectorKeys.KEY_DO_MEDIAN_FILTERING : False,
		} 
		    
		# Configure tracker
#		settings.trackerFactory = SparseLAPTrackerFactory()
		settings.trackerFactory = ManualTrackerFactory()
#		settings.trackerSettings = LAPUtils.getDefaultLAPSettingsMap()
		      
		#----------------------
		# Instantiate trackmate
		#----------------------
		   
		trackmate = TrackMate(model, settings)
		      
		#------------
		# Execute all
		#------------
		     
#		ok = trackmate.checkInput()
#		if not ok:
#			sys.exit(str(trackmate.getErrorMessage()))			     
		ok = trackmate.process()

#7

Traceback (most recent call last):
File “E:\Dropbox (ASU)\Projects\Research\Codes\lightScatterID\blobExtractionImageJ\BlobDetectionNoTrackingOld.py”, line 96, in
ok = trackmate.process()
at fiji.plugin.trackmate.TrackMate.execTracking(TrackMate.java:265)

at fiji.plugin.trackmate.TrackMate.process(TrackMate.java:678)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:497)