nimare.utils
.mm2vox
- mm2vox(xyz, affine)[source]
Convert coordinates to matrix subscripts.
Changed in version 0.0.8:
[ENH] This function was part of
nimare.transforms
in previous versions (0.0.3-0.0.7)
- Parameters
xyz ((X, 3)
numpy.ndarray
) – Coordinates in image-space. One row for each coordinate, with three columns: x, y, and z.affine ((4, 4)
numpy.ndarray
) – Affine matrix from image.
- Returns
ijk ((X, 3)
numpy.ndarray
) – Matrix subscripts for coordinates being transformed.
Notes
From here: http://blog.chrisgorgolewski.org/2014/12/how-to-convert-between-voxel-and-mm.html