Rank transform the intensity of an image to reduce the impact of outliers; useful when using correlation-based metrics for registration and possibly for segmentation tasks. best used with a mask.

rankIntensity(x, mask, getMask = TRUE, method = "max")

Arguments

x

input image

mask

optional mask

getMask

boolean only used if mask is not present

method

optional method passed to ties.method in rank

Value

image is output

Author

Avants BB

Examples


fi <- makeImage(c(10, 10, 10), rnorm(1000))
rfi <- rankIntensity(fi)