Skip to content

Commit

Permalink
RF: simplify transform handling
Browse files Browse the repository at this point in the history
  • Loading branch information
christianbrodbeck committed Feb 16, 2017
1 parent 268be97 commit 8abb42b
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions mne/viz/_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,17 +488,10 @@ def plot_trans(info, trans='auto', subject=None, subjects_dir=None,
subject + '-fiducials.fif')
if isinstance(fiducials, string_types):
fiducials, cf = read_fiducials(fiducials)
assert cf == FIFF.FIFFV_COORD_MRI
if cf != FIFF.FIFFV_COORD_MRI:
raise ValueError("Fiducials are not in MRI space")
fid_locs = _fiducial_coords(fiducials, FIFF.FIFFV_COORD_MRI)
if coord_frame == 'head':
mri_head_t = invert_transform(head_mri_t)
fid_locs = apply_trans(mri_head_t, fid_locs)
elif coord_frame == 'meg':
mri_head_t = invert_transform(head_mri_t)
head_dev_t = invert_transform(info['dev_head_t'])
mri_dev_t = combine_transforms(mri_head_t, head_dev_t, 'mri',
'meg')
fid_locs = apply_trans(mri_dev_t, fid_locs)
fid_locs = apply_trans(mri_trans, fid_locs)
else:
fid_locs = []

Expand Down

0 comments on commit 8abb42b

Please sign in to comment.