readAntsrTransform: readAntsrTransform

View source: R/antsrTransform_class.R

readAntsrTransformR Documentation

readAntsrTransform

Description

read a transform from file

Usage

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)
tx2 <- readAntsrTransform(txfile)
testthat::expect_error(readAntsrTransform(txfile, 2), "space dim")

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