Package: napari-laptrack
napari-laptrackTracking particles in Napari, using theLapTracklibrary.This plugin is young and has just limited functionality. Contributions are welcome.Installation instructionsIt is recommended to use this napari-plugin together withdevbio-napari.Install both using mamba-forge (download here) by running these commands line-by line from the terminal:mamba create --name napari-laptrack-env -c conda-forge python=3.9 devbio-naparimamba activate napari-laptrack-envpip install napari-laptrackUsageThe starting point for napari-laptrack is a 4D image layer and a corresponding labels layer.The following procedure demonstrates how to start from a 2D+t image stack, convert it in the right format and segment the labels.Afterwards, napari-laptrack is demonstrated. Depending on your input data, you may skip some of the initial steps.Example dataWe demonstrate the procedure using the example datasetFile > Open Samples > clesperanto > CalibZAPWfixedwhich should be available if you installeddevbio-napari.You can also download it fromzenodo.4D+t input data.In case your image data comes as 3D-stack, you must convert it in the format 4D+t with shape [t,1,y,x] first.You can do this using the menuTools > Utilities > Convert 3D stack to 2d+t timelapse, which is part of thenapari-time-slicerplugin.It will create a new layer named2D+t <original name>. After this conversion, you can delete the original image layer, which is recommended to avoid confusion due to too many layers.For deleting the original layer, select it and hit the trash-bin button.Object segmentationVarious segmentation algorithms are available in Napari (see theNapari-hub).In principle all algorithms are compatible if they produce a 3D+t label image as result.In this tutorial, we use theVoronoi-Otsu-Labeling algorithmimplemented usingclesperanto.It is available from the menuTools > Segmentation / labeling.Tracking labeled objectsNow that we have a 3D+t image and a corresponding label-image, we can start tracking the objects.Centroid-based tracking is available from the menuTracking > Track labeled objects (centroid-based, LapTrack).After tracking, multiple new layers will be added to Napari, which are explained in detail below.Furthermore, a table will open containing the columnscentroid-0/1/2with spatial positions of the labels.The table also contain columslabel,frameandtrack_id.All labels which belong to the same track, but to different frames, have the sametrack_id.In some cases, also layers namedStack 4D <original layer name>are created. This is done to store the labels which were analysed. These layers are technically duplicates of the original layers which were computed on-the-fly.The Tracks layerThe tracks layer visualizes the travel path of the labels' centroids over time.Read more about the Tracks layer in the Napari documentation.The Track-ID imageOne result of the plugin is a Track-ID image. This is a label image where objects have the same label / color over time.This image is not suited for many quantitative label-measurment methods because it is non-sequentially labeled.As example, two subsequent frames are shown:Similar and related pluginsThere are other napari-plugins and python packages which allow tracking particles, visualizing tracking data and quantiative measurements of tracks:arboretumbtrackultracknapari-strackingnapari-tracks-readervollseg-napari-trackmatepalmarinapari-amdtrkContributingContributions are very welcome. Tests can be run withtox, please ensurethe coverage at least stays the same before you submit a pull request.LicenseDistributed under the terms of theBSD-3license,"napari-laptrack" is free and open source softwareIssuesIf you encounter any problems, pleasefile an issuealong with a detailed description.