Skip to content

⑤ Contact (optional)

The Contact step finds which cells touch, within one population or between two (for example T cells and target cells), frame by frame.

Needs Cellpose masks

Contact works on cell outlines, so both sides must be Cellpose detection runs with their masks saved, and the run must have been saved at least once. A trackpy run has positions only and cannot be used.

Running

  1. Click + Contact run.
  2. Choose the detection runs under Cell type A from and Cell type B from. Choosing the same run on both sides gives self-contact (for example T cell–T cell).
  3. Set the Contact distance (μm).
  4. Click Apply to frames… and choose a frame range. Frames where either run has no saved mask yet are skipped.

How contact is decided

Same run on both sides
Adjacency: which cells in the mask share a border.
Two different runs
Overlap: which cell in mask A shares pixels with which cell in mask B. Two separately segmented channels can overlap by a few pixels where membranes press together.

In both cases each cell outline is first grown by the contact distance (converted from μm to pixels with the workspace's pixel size), so near-touching counts as contact. A distance of 0 means literal touching only.

Results appear as contact columns in the Cell Table and as the Contacts overlay in the Rendering panel.