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 – Matrix subscripts for coordinates being transformed.

Return type:

(X, 3) numpy.ndarray