antsCopyImageInfo2: Copy header info with different input order

View source: R/antsCopyImageInfo.R

antsCopyImageInfo2R Documentation

Copy header info with different input order

Description

Copy origin, direction, and spacing from one antsImage to another. Opposite order of input relative to antsCopyImageInfo

Usage

antsCopyImageInfo2(target, reference)

Arguments

target

image object of S4 class antsImage to copy values to.

reference

image object of S4 class antsImage to get values from.

Value

Target image with reference header information.

Examples


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


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