antsSetPixels: Set a pixel value at an index

View source: R/ants_set_get.R

antsSetPixelsR Documentation

Set a pixel value at an index

Description

Set a pixel value at an index in an 'antsImage'.

Usage

antsSetPixels(x, i = NA, j = NA, k = NA, l = NA, value)

Arguments

x

Image object of S4 class 'antsImage'.

i

the slowest moving index to the image

j

the next slowest moving index to the image, similar for k ( 2d )

k

the next slowest moving index to the image ( 3d )

l

the next slowest moving index to the image ( 4d )

value

the value to place at this location

Value

array of pixel values

Examples

img <- makeImage(c(10, 10), rnorm(100))
antsSetPixels(img, 2, 3, value = Inf)


stnava/ANTsR documentation built on April 16, 2024, 12:17 a.m.