trans {neuroim2}R Documentation

Extract image coordinate transformation

Description

Extract image coordinate transformation

Get transformation matrix

Usage

trans(x)

## S4 method for signature 'MetaInfo'
trans(x)

## S4 method for signature 'NeuroObj'
trans(x)

## S4 method for signature '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. see NeuroSpace

Value

A numeric 4x4 matrix that maps from grid coordinates to real-world coordinates.

Examples

bspace <- NeuroSpace(c(10,10,10), c(2,2,2))
trans(bspace)
all.equal(dim(trans(bspace)), c(4,4))

[Package neuroim2 version 0.8.1 Index]