View source: R/thresholdImage.R
thresholdImage | R Documentation |
converts a scalar image into a binary image by thresholding operations
thresholdImage(inimg, lothresh, hithresh, inval=1, outval=0)
inimg |
Input image to operate on |
lothresh |
Lower edge of threshold window |
hithresh |
Higher edge of threshold window |
inval |
Output value for image voxels in between |
outval |
Output value for image voxels lower than |
antsImage
Shrinidhi KL
set.seed(1234)
img <- makeImage(c(5, 5), rnorm(25) + 0.5)
imgt <- thresholdImage(img, 0.5, Inf)
testthat::expect_equal(sum(imgt), 9)
imgt <- thresholdImage(img > 0.5, 0.1, Inf)
testthat::expect_equal(sum(imgt), 9)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.