View source: R/lesioncenters.R
lesioncenters | R Documentation |
This function finds the centers of distinct lesions based on a lesion probability map. The method is described in Dworkin et al., (2018).
lesioncenters(probmap, binmap, minCenterSize = 10, radius = 1, parallel = F, cores = 2)
probmap |
a 3D array or image of class |
binmap |
a 3D array or |
minCenterSize |
an integer value representing the minimum number of connected voxels that can be considered a lesion center |
radius |
an integer specifying radius of the neighborhood (in voxels) for which the hessian should be calculated. |
parallel |
is a logical value that indicates whether the user's computer is Linux or Unix (i.e. macOS), and should run the code in parallel |
cores |
if parallel = TRUE, cores is an integer value that indicates how many cores the function should be run on |
A list containing lesioncenters (a nifti file with labeled lesion centers) and lesioncount (an integer value representing the number of distinct lesions)
J.D. Dworkin, K.A. Linn, I. Oguz, G.M. Fleishman, R. Bakshi, G. Nair, P.A. Calabresi, R.G. Henry, J. Oh, N. Papinutto, D. Pelletier, W. Rooney, W. Stern, N.L. Sicotte, D.S. Reich, R.T. Shinohara. An automated statistical technique for counting distinct multiple sclerosis lesions. American Journal of Neuroradiology, 2018; 39, 626-633.
## Not run: library(neurobase) lesion.probs <- readnii('path/to/probabilitymap') centers <- lesioncenters(probmap = lesion.probs, binmap = lesion.probs>0.30, parallel = TRUE, cores = 4) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.