Class for MRI<->head coregistration.
Info
| None
The measurement info.
str
The FreeSurfer subject name.
None
The path to the directory containing the FreeSurfer subjects
reconstructions. If None
, defaults to the SUBJECTS_DIR
environment
variable.
list
| dict
| str
The fiducials given in the MRI (surface RAS) coordinate
system. If a dictionary is provided, it must contain the keys
'lpa'
, 'rpa'
, and 'nasion'
, with values being the
respective coordinates in meters.
If a list, it must be a list of DigPoint
instances as returned by the
mne.io.read_fiducials()
function.
If 'estimated'
, the fiducials are derived from the fsaverage
template. If 'auto'
(default), tries to find the fiducials
in a file with the canonical name
({subjects_dir}/{subject}/bem/{subject}-fiducials.fif
)
and if absent, falls back to 'estimated'
.
What to do if the surface is found to have topological defects.
Can be 'raise'
(default) to raise an error, 'warn'
to emit a
warning, or 'ignore'
to ignore when one or more defects are found.
Note that a lot of computations in MNE-Python assume the surfaces to be
topologically correct, topological defects may still make other
computations (e.g., mne.make_bem_model
and mne.make_bem_solution
)
fail irrespective of this parameter.
New in version 1.0.
See also
Notes
Internal computation quantities parameters are in the following units:
rotation are in radians
translation are in m
scale are in scale proportion
If using a scale mode, the scale_mri()
should be used
to create a surrogate MRI subject with the proper scale factors.
DigMontage
A montage containing the MRI fiducials.
trans
instance of Transform
The head->mri Transform
.
Methods
Compute distance between head shape points and MRI skin surface. |
|
|
Find rotation and translation to fit all 3 fiducials. |
|
Find MRI scaling, translation, and rotation to match HSP. |
|
Exclude head shape points that are far away from the MRI head. |
|
Reset all the parameters affecting the coregistration. |
|
Set the strategy for fitting anatomical landmark (fiducial) points. |
|
Compensate for hair on the digitizer head shape. |
|
Set the rotation parameter. |
|
Set the scale parameter. |
|
Select how to fit the scale parameters. |
|
Set the translation parameter. |
Compute distance between head shape points and MRI skin surface.
array
, shape (n_points,)The distance of the head shape points to the MRI skin surface.
See also
Examples using compute_dig_mri_distances
:
Using an automated approach to coregistration
Find rotation and translation to fit all 3 fiducials.
float
Relative weight for LPA. The default value is 1.
float
Relative weight for nasion. The default value is 10.
float
Relative weight for RPA. The default value is 1.
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.
Coregistration
The modified Coregistration object.
Examples using fit_fiducials
:
Using an automated approach to coregistration
Find MRI scaling, translation, and rotation to match HSP.
int
Maximum number of iterations.
float
Relative weight for LPA. The default value is 1.
float
Relative weight for nasion. The default value is 10.
float
Relative weight for RPA. The default value is 1.
float
Relative weight for HSP. The default value is 1.
float
Relative weight for EEG. The default value is 1.
float
Relative weight for HPI. The default value is 1.
callable()
| None
A function to call on each iteration. Useful for status message
updates. It will be passed the keyword arguments iteration
and n_iterations
.
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.
Coregistration
The modified Coregistration object.
Examples using fit_icp
:
Using an automated approach to coregistration
Exclude head shape points that are far away from the MRI head.
float
Exclude all points that are further away from the MRI head than this distance (in m.). A value of distance <= 0 excludes nothing.
Coregistration
The modified Coregistration object.
Examples using omit_head_shape_points
:
Using an automated approach to coregistration
Reset all the parameters affecting the coregistration.
Coregistration
The modified Coregistration object.
Set the strategy for fitting anatomical landmark (fiducial) points.
Alignment strategy; 'nearest'
aligns anatomical landmarks to
any point on the head surface; 'matched'
aligns to the fiducial
points in the MRI.
Coregistration
The modified Coregistration object.
Compensate for hair on the digitizer head shape.
float
Move the back of the MRI head outwards by value
(mm).
Coregistration
The modified Coregistration object.
Set the rotation parameter.
array
, shape (3,)The rotation parameter (in radians).
Coregistration
The modified Coregistration object.
Set the scale parameter.
array
, shape (3,)The scale parameter.
Coregistration
The modified Coregistration object.
Select how to fit the scale parameters.
Coregistration
The modified Coregistration object.
Examples using set_scale_mode
:
Using an automated approach to coregistration
Set the translation parameter.
array
, shape (3,)The translation parameter (in m.).
Coregistration
The modified Coregistration object.
mne.coreg.Coregistration
#Using an automated approach to coregistration