Learn R Programming

R4dfp (version 0.2-4)

R4dfp.CoordToVoxel: Translate a Coordinate to a Voxel.

Description

Translate a coordinate to a voxel for a specific 4dfp MRI image.

Usage

R4dfp.CoordToVoxel(object,coord)

Arguments

object
Object of class ‘R4dfp’.
coord
An Nx3 matrix of coordinates to translate into voxels.

Value

Nx3 matrix of voxels.

Details

Finds the nearest voxel to the given coordinates. Image limits aren't checked.

See Also

R4dfp.VoxelToCoord R4dfp.Load R4dfp.Save R4dfp.Close R4dfp.Recycle

Examples

Run this code
#get the nearest voxel to the origin
myimage <- R4dfp.Blank333()
voxel <- R4dfp.CoordToVoxel(myimage,c(0,0,0))

Run the code above in your browser using DataLab