mne.head_to_mri#
- mne.head_to_mri(pos, subject, mri_head_t, subjects_dir=None, *, kind='mri', unscale=False, verbose=None)[source]#
Convert pos from head coordinate system to MRI ones.
- Parameters:
- pos
array
, shape (n_pos, 3) The coordinates (in m) in head coordinate system.
- subject
str
The FreeSurfer subject name.
- mri_head_tinstance of
Transform
MRI<->Head coordinate transformation.
- subjects_dirpath-like |
None
The path to the directory containing the FreeSurfer subjects reconstructions. If
None
, defaults to theSUBJECTS_DIR
environment variable.- kind
str
The MRI coordinate frame kind, can be
'mri'
(default) for FreeSurfer surface RAS or'ras'
(default in 1.2) to use MRI RAS (scanner RAS).New in version 1.2.
- unscale
bool
For surrogate MRIs (e.g., scaled using
mne coreg
), if True (default False), use the MRI scaling parameters to obtain points in the original/surrogate subject’s MRI space.New in version 1.2.
- verbose
bool
|str
|int
|None
Control verbosity of the logging output. If
None
, use the default verbosity level. See the logging documentation andmne.verbose()
for details. Should only be passed as a keyword argument.
- pos
- Returns:
- coordinates
array
, shape (n_pos, 3) The MRI RAS coordinates (in mm) of pos.
- coordinates
Notes
This function requires nibabel.