Learn R Programming

ANTsR (version 0.3.3)

getPixels: Get Pixels

Description

Get pixel values from an 'antsImage'.

Usage

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

Run this code

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


Run the code above in your browser using DataLab