Skip to content

MRG: Block points behind the head - #4938

Merged
larsoner merged 1 commit into
mne-tools:masterfrom
larsoner:block-behind
Feb 23, 2018
Merged

larsoner merged 1 commit into
mne-tools:masterfrom
larsoner:block-behind

Conversation

@larsoner

Copy link
Copy Markdown
Member

Even when the head is translucent, points behind it should be blocked (i.e., the inside walls of the head should be opaque). This makes it clearer which points are on the near side of the head when doing fits.

For example, look at the sample data:

mne coreg --subjects-dir=$HOME/mne_data/MNE-sample-data/subjects -f ~/mne_data/MNE-sample-data/MEG/sample/sample_audvis_raw.fif --no-guess-mri -s sample --high-res-head --trans=$HOME/mne_data/MNE-sample-data/MEG/sample/sample_audvis_raw-trans.fif

Let's scale up the MRI by a factor of 1.1 to make it clear what we're talking about -- on master and this PR, this is what you'd see -- all points inside the head are appropriately alpha blended with the head:

screenshot from 2018-02-13 16-55-17

On the other hand, if scale MRI by a factor of 0.9 to shrink it, we get this on master, which makes it look like some points might be inside the head, but these are really just on the far side of it:

screenshot from 2018-02-13 16-54-41

However, these points are actually outside the head -- on the current PR the points on the far side of the head are "removed", making it clear that there are no points inside the head (and note the decreased size of the large purple ball, too, showing just the part that extends inside the head):

screenshot from 2018-02-13 16-55-10

Having done a number of surrogate MRI transformations, I think this could really help make it clearer when all the points are outside the head (as they should be), requiring a bit less rotating of the view.

@christianbrodbeck this is also ready for review from my end.

@larsoner larsoner mentioned this pull request Feb 13, 2018
26 of 29 tasks
@codecov

codecov Bot commented Feb 13, 2018 •

Copy link
Copy Markdown

Codecov Report

Merging #4938 into master will decrease coverage by 0.01%.
The diff coverage is 40%.

@@            Coverage Diff             @@
##           master    #4938      +/-   ##
==========================================
- Coverage   87.84%   87.83%   -0.02%     
==========================================
  Files         353      353              
  Lines       62945    62957      +12     
  Branches    10779    10781       +2     
==========================================
+ Hits        55295    55298       +3     
- Misses       4909     4916       +7     
- Partials     2741     2743       +2

@larsoner

Copy link
Copy Markdown
Member Author

@christianbrodbeck this is the other coreg PR that is good to go

@larsoner larsoner added this to the 0.16 milestone Feb 21, 2018
@larsoner
larsoner merged commit bab48ab into mne-tools:master Feb 23, 2018
@larsoner
larsoner deleted the block-behind branch February 23, 2018 17:11
britta-wstnr pushed a commit to britta-wstnr/mne-python that referenced this pull request Jul 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants