mne.preprocessing.ieeg.make_montage_volume#

mne.preprocessing.ieeg.make_montage_volume(montage, base_image, thresh=0.5, max_peak_dist=1, voxels_max=100, use_min=False, verbose=None)[source]#

Make a volume from intracranial electrode contact locations.

Find areas of the input volume with intensity greater than a threshold surrounding local extrema near the channel location. Monotonicity from the peak is enforced to prevent channels bleeding into each other.

Parameters:
montageinstance of mne.channels.DigMontage

The montage object containing the channels.

base_imagepath-like | nibabel.spatialimages.SpatialImage

Path to a volumetric scan (e.g. CT) of the subject. Can be in any format readable by nibabel. Can also be a nibabel image object. Local extrema (max or min) should be nearby montage channel locations.

threshfloat

The threshold relative to the peak to determine the size of the sensors on the volume.

max_peak_distint

The number of voxels away from the channel location to look in the image. This will depend on the accuracy of the channel locations, the default (one voxel in all directions) will work only with localizations that are that accurate.

voxels_maxint

The maximum number of voxels for each channel.

use_minbool

Whether to hypointensities in the volume as channel locations. Default False uses hyperintensities.

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:
elec_imagenibabel.spatialimages.SpatialImage

An image in Freesurfer surface RAS space with voxel values corresponding to the index of the channel. The background is 0s and this index starts at 1.