Learn R Programming

ANTsR (version 1.0)

antsImageGetSet: antsImageGetSet

Description

Get and set methods for image header information

Usage

antsGetSpacing(x)

antsSetSpacing(x, spacing)

antsGetOrigin(x)

antsSetOrigin(x, origin)

antsGetDirection(x)

antsSetDirection(x, direction)

Arguments

x

antsImage to access, of dimensionality d.

spacing

numeric vector of length d.

origin

numeric vector of length d.

direction

matrix of size d * d.

Value

For get methods, vector of length d (origin, spacing) or matrix of size d * d (direction). For set methods, 0 to indicate success.

Examples

Run this code
# NOT RUN {
img <- makeImage(c(5,5), rnorm(25))
antsSetSpacing(img, c(2.0, 2.0))
antsSetOrigin(img, c(0.5, 0.5))
# }

Run the code above in your browser using DataLab