read a transform from file

readAntsrTransform(filename, dimension = NA, precision = "float")

Arguments

filename

filename of transform

dimension

spatial dimension of transform

precision

numerical precision of transform

Value

antsrTransform

Examples

trans <- c(3, 4, 5)
tx <- createAntsrTransform(type = "Euler3DTransform", translation = trans)
txfile <- tempfile(fileext = ".mat")
writeAntsrTransform(tx, txfile)
#> [1] TRUE
tx2 <- readAntsrTransform(txfile)
testthat::expect_error(readAntsrTransform(txfile, 2), "space dim")