mne_bids.get_anat_landmarks#
- mne_bids.get_anat_landmarks(image, info, trans, fs_subject, fs_subjects_dir=None)[source]#
Get anatomical landmarks in MRI voxel coordinates.
This function transforms the fiducial points from “head” to MRI “voxel” coordinate space. The landmarks obtained are defined w.r.t. the MRI passed via the
image
parameter.- Parameters:
- imagepath-like |
mne_bids.BIDSPath
|NibabelImageObject
Path to an MRI scan (e.g. T1w) of the subject. Can be in any format readable by nibabel. Can also be a nibabel image object of an MRI scan. Will be written as a .nii.gz file.
- info
mne.Info
The measurement information from an electrophysiology recording of the subject with the anatomical landmarks stored in its
mne.channels.DigMontage
.- trans
mne.transforms.Transform
| path-like The transformation matrix from head to MRI coordinates. Can also be a string pointing to a
.trans
file containing the transformation matrix.- fs_subject
str
The subject identifier used for FreeSurfer. Must be provided to write the anatomical landmarks if they are not provided in MRI voxel space. This is because the head coordinate of a
mne.channels.DigMontage
is aligned using FreeSurfer surfaces.- fs_subjects_dirpath-like |
None
The FreeSurfer subjects directory. If
None
, defaults to theSUBJECTS_DIR
environment variable. Must be provided to write anatomical landmarks if they are not provided in MRI voxel space.
- imagepath-like |
- Returns:
- landmarks
mne.channels.DigMontage
A montage with the landmarks in MRI voxel space.
- landmarks
Examples using mne_bids.get_anat_landmarks
#
07. Save and load T1-weighted MRI scan along with anatomical landmarks in BIDS
08. Convert iEEG data to BIDS format