Copy origin, direction, and spacing from one antsImage to another

antsCopyImageInfo(reference, target)

Arguments

reference

image object of S4 class antsImage to get values from.

target

image object of S4 class antsImage to copy values to.

Value

Target image with reference header information.

Examples


img <- makeImage(c(10, 10), rnorm(100))
img2 <- makeImage(c(10, 10), rnorm(100))
img2 <- antsCopyImageInfo(img, img2)
testthat::expect_error(antsCopyImageInfo(img, 1))