Description Usage Arguments Details Value Note Author(s) See Also Examples
Converts 3 dimensional xyz (world) coordinates into 1-relative ijk (voxel) coordinates.
1 | rmincUtil.convertWorldToVoxel(filename, worldCoords)
|
filename |
The name of a minc2 volume to be used to do the conversion to voxel space. |
worldCoords |
A 3 item vector of world coordinates in xyz order. |
Conversion requires access to a minc2 volume in order to enable the world to voxel mapping.
A 3-item vector of 1-relative voxel coordinates.
TODO: I really should be able to pass a MincInfo object and do the conversion within R code, without having to jump into the minc2 API.
Jim Nikelski nikelski@bic.mni.mcgill.ca
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
# set the xyz voxel coordinates
xyzCoords <- c(0, 0, 0)
# create a full pathname to the sample volumes
v305PET <- file.path(volDir, "average305_PET_t1_tal_lin.mnc")
print(v305PET)
# convert and show it
ijkCoords <- rmincUtil.convertWorldToVoxel(v305PET, xyzCoords)
print(ijkCoords)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.