Skip to contents

Extract image coordinate transformation

Usage

trans(x)

# S4 method for MetaInfo
trans(x)

# S4 method for NIFTIMetaInfo
trans(x)

# S4 method for NeuroObj
trans(x)

# S4 method for NeuroSpace
trans(x)

Arguments

x

an object with a transformation

Details

This function returns a transformation that can be used to go from "grid coordinates" to "real world coordinates" in millimeters.

This function returns a transformation that can be used to go from "grid coordinates" to "real world coordinates" in millimeters. see NeuroSpace

Examples

bspace <- NeuroSpace(c(10,10,10), c(2,2,2))
trans(bspace)
#>      [,1] [,2] [,3] [,4]
#> [1,]    2    0    0    0
#> [2,]    0    2    0    0
#> [3,]    0    0    2    0
#> [4,]    0    0    0    1
all.equal(dim(trans(bspace)), c(4,4))
#> [1] TRUE