rmincUtil.convertVoxelToWorld: Convert Voxel to World Coordinates

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/rmincUtil.R

Description

Converts 1-relative 3 dimensional ijk (voxel) coordinates into xyz (world) coordinates.

Usage

1
rmincUtil.convertVoxelToWorld(filename, voxCoords)

Arguments

filename

The name of a minc2 volume to be used to do the conversion to world space.

voxCoords

A 3 item vector of 1-relative voxel coordinates.

Details

I believe that all coordinates are in xyz order. I am pretty sure that this would not work with a 4D volume, but have not yet come up with a use-case, given that no 4D internal structures exist. Perhaps, reading a frame from a 4D volume, and then wanting to do a coordinate conversion. Hmmmmm, must ponder.

Value

A 3-item vector of world coordinates.

Author(s)

Jim Nikelski nikelski@bic.mni.mcgill.ca

See Also

rmincUtil.convertWorldToVoxel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
# set the xyz voxel coordinates
ijkCoords <- c(10, 20, 30)

# create a full pathname to the sample volumes
v305PET <- file.path(volDir, "average305_PET_t1_tal_lin.mnc")
print(v305PET)

# convert and show it
xyzCoords <- rmincUtil.convertVoxelToWorld(v305PET, ijkCoords)
print(xyzCoords)

## End(Not run)

jnikelski/rmincIO documentation built on May 19, 2019, 2:58 p.m.