mne_bids.update_anat_landmarks#
- mne_bids.update_anat_landmarks(bids_path, landmarks, *, fs_subject=None, fs_subjects_dir=None, kind=None, on_missing='raise', verbose=None)[source]#
Update the anatomical landmark coordinates of an MRI scan.
This will change the
AnatomicalLandmarkCoordinatesentry in the respective JSON sidecar file, or create it if it doesn’t exist.- Parameters:
- bids_path
BIDSPath Path of the MR image.
- landmarks
mne.channels.DigMontage| path-like An
mne.channels.DigMontageinstance with coordinates for the nasion and left and right pre-auricular points in MRI voxel coordinates. Alternatively, the path to a*-fiducials.fiffile as produced by the MNE-Python coregistration GUI or viamne.io.write_fiducials().Note
mne_bids.get_anat_landmarks()provides a convenient and reliable way to generate the landmark coordinates in the required coordinate system.Note
If
path-like,fs_subjectandfs_subjects_dirmust be provided as well.Changed in version 0.10: Added support for
path-likeinput.- fs_subject
str|None The subject identifier used for FreeSurfer. Must be provided if
landmarksispath-like; otherwise, it will be ignored.- fs_subjects_dirpath-like |
None The FreeSurfer subjects directory. If
None, defaults to theSUBJECTS_DIRenvironment variable. Must be provided iflandmarksispath-like; otherwise, it will be ignored.- kind
str|None The suffix of the anatomical landmark names in the JSON sidecar. A suffix might be present e.g. to distinguish landmarks between sessions. If provided, should not include a leading underscore
_. For example, if the landmark names in the JSON sidecar file areLPA_ses-1,RPA_ses-1,NAS_ses-1, you should pass'ses-1'here. IfNone, no suffix is appended, the landmarks namedNasion(orNAS),LPA, andRPAwill be used.New in version 0.10.
- on_missing‘ignore’ | ‘warn’ | ‘raise’
How to behave if the specified landmarks cannot be found in the MRI JSON sidecar file.
New in version 0.10.
- 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.
- bids_path
Notes
New in version 0.8.