Learn R Programming

ANTsR (version 0.3.3)

thresholdImage: Threshold Image

Description

converts a scalar image into a binary image by thresholding operations

Usage

thresholdImage(inimg, lothresh, hithresh, inval=1, outval=0)

Arguments

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 lothresh and hithresh
outval
Output value for image voxels lower than lothresh or higher than hithresh

Value

antsImage

Examples

Run this code
img <- makeImage(c(5,5), rnorm(25)+0.5)
imgt<-thresholdImage( img, 0.5, Inf )

Run the code above in your browser using DataLab