Warp a montage to a template with image volumes using SDR.
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.
Note
This is likely only applicable for channels inside the brain (intracranial electrodes).
mne.channels.DigMontage
The montage object containing the channels.
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.
ndarray
of float
, shape (4, 4)The affine that registers one volume to another.
dipy.align.DiffeomorphicMap
The class that applies the the symmetric diffeomorphic registration (SDR) morph.
str
The name of the subject used for the Freesurfer reconstruction.
str
The name of the subject to use as a template to morph to (e.g. ‘fsaverage’).
None
The path to the Freesurfer recon-all
directory for the
subject_from
subject. The SUBJECTS_DIR
environment
variable will be used when None
.
None
The path to the Freesurfer recon-all
directory for the
subject_to
subject. subject_dir_from
will be used
when None
.
float
The threshold relative to the peak to determine the size of the sensors on the volume.
int
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.
int
The maximum number of voxels for each channel.
Whether to hypointensities in the volume as channel locations. Default False uses hyperintensities.
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.
mne.channels.DigMontage
The modified montage object containing the channels.
nibabel.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.
nibabel.spatialimages.SpatialImage
The warped image with voxel values corresponding to the index of the channel. The background is 0s and this index starts at 1.
mne.warp_montage_volume
#Locating intracranial electrode contacts