soft-matter/trackpy

Calling tp.link on pre-segmented objects

Closed this issue · 4 comments

Hello,

I was wondering if it is possible to call the tp.link function on pre segmented objects (i.e. on Cellpose masks).
I would like to try Trackpy on live imaging of cells (brightield) which have been segmented already with Cellpose.

Thanks!
Ciro

nkeim commented

I'm not familiar with that package. What kind of output does it produce that link would need to process? (Is it different from an array of coordinates?)

Th output of Cellpose is an array of labels with the same dimension of the image, in which every pixel of the background has value 0 and for the pixels of the cells value >0. Pixels of the same object (cell) have the same label value.

nkeim commented

Thanks. It sounds like you can use skimage.measure.regionprops() to get the centroids of the labeled regions. See the trackpy bubble tracking tutorial for an example: http://soft-matter.github.io/trackpy/v0.5.0/tutorial/custom-feature-detection.html

Thanks a lot! It works now :)