nimare.transforms
.mm2vox¶
-
mm2vox
(xyz, affine)[source]¶ Convert coordinates to matrix subscripts.
- 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