Learn R Programming

AnalyzeFMRI (version 1.1-24)

xyz2ijk: xyz2ijk

Description

This function maps from some real world (x,y,z) positions in space into data coordinates (e.g. column i, row j, slice k). These original positions could relate to Talairach-Tournoux (T&T) space, MNI space, or patient-based scanner coordinates.

Usage

xyz2ijk(xyz=c(1,1,1),method=2,L)

Arguments

xyz

matrix. Each column of xyz should contain a voxel real world index coordinates (x,y,z) to be mapped to its (i,j,k) voxel index coordinates in the dataset

method

1 (qform.code=sform.code=0),2 (qform.code>0, rigid transformation) or 3 (sform.code>0, affine transformation).

L

header list of a NIFTI file

Value

A list containing the matrix xyz of the positions of the points specified in ijk.

Details

See help page of function ijk2xyz().

See Also

ijk2xyz Q2R R2Q

Examples

Run this code
# NOT RUN {
L <- f.read.header(system.file("example-nifti.hdr",
package="AnalyzeFMRI"))
xyz <- matrix(c(1,1,1,2,3,7),byrow=FALSE,nrow=3)
xyz2ijk(xyz=xyz,method=2,L)
# }

Run the code above in your browser using DataLab