ROIs to TrackMate

Thanks @LPUoO for the thorough inspection!

We have had quite a few headaches with setting the ROI positions, as setPosition§ and setPosition(channel, slice, frame) fill different values in the Roi object independently of each other.

The reason we chose to use setPosition(i) is that since TrackMate in general does not perform any kind of work or statistics on mutltichannel images, and because StarDist 2D work only with 2D single channel images, we expect that the input for this script be a 2D+T stack. Thus getPosition(channel, slice, frame) would not return anything useful and then getPosition(i) was the selected choice.

The idea is that our script can be expanded as needed.

For example. Before running our script on multichannel images, we would first split the channels and perform the StarDist detection on the selected channel. If we then needed to calculate the intensity on a second channel, this would be “manually” added after our Script by calling RoiManager("Measure"); on the second channel.



1 Like