Get pixel values from an 'antsImage'.

getPixels(x, i = NA, j = NA, k = NA, l = NA)

Arguments

x

Image object of S4 class 'antsImage' to get values from.

i

indices in first dimension

j

indices in second dimension

k

indices in third dimension

l

indices in forth dimension

Value

array of pixel values

Examples

img <- makeImage(c(10, 10), rnorm(100))
pixel <- getPixels(img, i = c(1, 2), j = 1)