if (FALSE) {
# Read an affine transform
xfm <- io_read_ants_transform("sub-01_from-T1w_to-MNI_xfm.mat")
# Explicitly specify spaces
xfm <- io_read_ants_transform(
"transform.h5",
space_from = "native",
space_to = "MNI152"
)
# Read as active (point) transform
xfm <- io_read_ants_transform(
"transform.mat",
interpretation = "active"
)
# Chain multiple transforms
xfm1 <- io_read_ants_transform("from-T1w_to-T2w_xfm.mat")
xfm2 <- io_read_ants_transform("from-T2w_to-MNI_xfm.h5")
combined <- as_ieegio_transform(list(xfm1, xfm2))
}
Run the code above in your browser using DataLab