Description Usage Arguments Value Examples
View source: R/remove_small_components.R
Remove connected objects with volume <27 voxels
1 | remove_small_components(img, threshold = 0.34, voxel_threshold = 27)
|
img |
A probability image from |
threshold |
threshold to apply to image to create a mask ( less than or equal) |
voxel_threshold |
Threshold of number of voxels to remove if smaller than this number (strict inequality) |
An array or object of class nifti
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | user = Sys.getenv("USER")
if (user %in% c("johnmuschelli", "travis") &
Sys.info()["sysname"] == "Darwin"){
reticulate::use_python(
"/Library/Frameworks/Python.framework/Versions/3.5/bin/python3")
} else {
python = system("which python", intern = TRUE)
print(python)
reticulate::use_python(python)
}
set.seed(100)
d = rep(50, 3)
img = array(runif(prod(d), max = 1), dim = d)
cc = remove_small_components(img, threshold = 0.9)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.