mne.bem.convert_flash_mris#

mne.bem.convert_flash_mris(subject, flash30=True, unwarp=False, subjects_dir=None, flash5=True, verbose=None)[source]#

Synthesize the flash 5 files for use with make_flash_bem.

This function aims to produce a synthesized flash 5 MRI from multiecho flash (MEF) MRI data. This function can use MEF data with 5 or 30 flip angles. If flash5 (and flash30) images are not explicitly provided, it will assume that the different echos are available in the mri/flash folder of the subject with the following naming convention “mef<angle>_<echo>.mgz”, e.g. “mef05_001.mgz” or “mef30_001.mgz”.

Parameters:
subjectstr

Subject name.

flash30bool | list of SpatialImage or path-like | SpatialImage | path-like

If False do not use 30-degree flip angle data. The list of flash 5 echos to use. If True it will look for files named mef30_*.mgz in the subject’s mri/flash directory and if not False the list of flash 5 echos images will be written to the mri/flash folder with convention mef05_<echo>.mgz. If a SpatialImage object each frame of the image will be interpreted as an echo.

unwarpbool

Run grad_unwarp with -unwarp option on each of the converted data sets. It requires FreeSurfer’s MATLAB toolbox to be properly installed.

subjects_dirpath-like | None

The path to the directory containing the FreeSurfer subjects reconstructions. If None, defaults to the SUBJECTS_DIR environment variable.

flash5list of SpatialImage or path-like | SpatialImage | path-like | True

The list of flash 5 echos to use. If True it will look for files named mef05_*.mgz in the subject’s mri/flash directory and if not None the list of flash 5 echos images will be written to the mri/flash folder with convention mef05_<echo>.mgz. If a SpatialImage object each frame of the image will be interpreted as an echo.

verbosebool | str | int | None

Control verbosity of the logging output. If None, use the default verbosity level. See the logging documentation and mne.verbose() for details. Should only be passed as a keyword argument.

Returns:
flash5_imgpath-like

The path the synthesized flash 5 MRI.

Notes

This function assumes that the Freesurfer segmentation of the subject has been completed. In particular, the T1.mgz and brain.mgz MRI volumes should be, as usual, in the subject’s mri directory.