SALR clustering
Locating nuclei centers
Create helpers and visualize nuclei clumps
Setup SALR clustering parameters
The parameters needed to run SALR clustering can all be accessed and set using the class seedPointOptions
. This class handles parameter validation as well as computing/visualizing the SALR particle interaction parameters/potential. Note, many of the values assigned below are the default values of seedPointOptions
; they are only being assigned here for demostrative purposes.
Set the particle initialization parameters.
- Use a uniform random point distribution. This will overlay a hexagonal lattice across the grid where the distance between two hexagon centers is
2*Wigner_Seitz_Radius
. From each lattice cell, a point is then randomly selected from a set of possible initial positionsr0set
where the confining potential is less thanMaximum_Initial_Potential
.
Set confining potential parameters.
- Use a confining potential based on the distance transform
- Scale the object so that its maximum distance transform value is 18. This gives SALR clustering a »scale invariance«.
- Add a small padding around the object to ensure the confining potential defined around the object.
Set the particle interaction parameter values.
- Note the
Potential_Parameters
are given in data units after scaling the data space so that the object has a maximum distance transform value ofMax_Distance_Transform
.
Set up replicates and minimum cluster size.
- Here we only use 1 replicate and accept all seed-points returned. We could get a small increase in performance by using several replicates and/or requiring a larger
Minimum_Cluster_Size
; however, when trying to locate nuclei centers, it is likely that we are trying to locate the centers of hundreds of thousands of nuclei. Therefore, increasing speed is may be more important that increasing performance by a small amount.
Set parameters controlling execution.
- Verbose will output information on the current iteration and the expected time of completion.
- Debug will return extra information.
- Use_Parallel will determine if the iterations are run in parallel.
Compute nuclei centers & visualize
The seed-points are simply computed by passing the binary mask and the seedPointOptions
to computeNucleiCenters
. computeNucleiCenters
is essentially a wrapper for computeObjectSeedPoints
that will automatically compute a set of possible initial positions based on the centers of curvature of each object boundary and then locate the seed-points of each object. Additionally, the output of the function contains the object number (nuclei clump) to which the seed-point belongs.
Evaluate performance
Here, lets test the performance of the SALR clustering results by computing the F1 score and the fractional distribution of the difference between the true number of nuclei in each clump and the computed number of nuclei in each clump.
- The F1 score depends on the distance at which we define a computed point to be a true positive point; thus, we can compute the F1 score at several such distances, from very close
dr=3
to quite fardr=10
.
Data set description
The nuclei images used in this work were created as follows. A whole slide reader was used to image an entire coverslip full of cells. The nuclei were then segmented from the background using an adaptive Otsu thresholding1 technique. The foreground regions were then analyzed and divided into five groups based on their normalized integrated DAPI florescence intensity. From each of these five groups, 484 objects were randomly selected and put into the images that are included in this work. For more information, please refer to our manuscript2.
James Kapaldo EXAMPLES