{"action":"created","issue":{"url":"https://api.github.com/repos/mne-tools/mne-python/issues/4966","repository_url":"https://api.github.com/repos/mne-tools/mne-python","labels_url":"https://api.github.com/repos/mne-tools/mne-python/issues/4966/labels{/name}","comments_url":"https://api.github.com/repos/mne-tools/mne-python/issues/4966/comments","events_url":"https://api.github.com/repos/mne-tools/mne-python/issues/4966/events","html_url":"https://github.com/mne-tools/mne-python/pull/4966","id":299894922,"number":4966,"title":"MRG: Add scale by distance, orient to surface for mne coreg","user":{"login":"larsoner","id":2365790,"avatar_url":"https://avatars1.githubusercontent.com/u/2365790?v=4","gravatar_id":"","url":"https://api.github.com/users/larsoner","html_url":"https://github.com/larsoner","followers_url":"https://api.github.com/users/larsoner/followers","following_url":"https://api.github.com/users/larsoner/following{/other_user}","gists_url":"https://api.github.com/users/larsoner/gists{/gist_id}","starred_url":"https://api.github.com/users/larsoner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larsoner/subscriptions","organizations_url":"https://api.github.com/users/larsoner/orgs","repos_url":"https://api.github.com/users/larsoner/repos","events_url":"https://api.github.com/users/larsoner/events{/privacy}","received_events_url":"https://api.github.com/users/larsoner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-02-24T00:59:03Z","updated_at":"2018-02-27T21:13:24Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/mne-tools/mne-python/pulls/4966","html_url":"https://github.com/mne-tools/mne-python/pull/4966","diff_url":"https://github.com/mne-tools/mne-python/pull/4966.diff","patch_url":"https://github.com/mne-tools/mne-python/pull/4966.patch"},"body":"This PR:\r\n\r\n1. Always loads low-res and high-res surfaces; always uses low-res for geometrical calculations (nice speedups when viewing high-res head), computes a low-res mesh if only a high-res is available (should be very rare)\r\n2. Adds \"orient-to-surface\" that turns spheres to cylinders oriented toward the surface.\r\n3. Adds \"scale-by-distance\" that scales the points by their distance from the surface.\r\n4. Adds \"mark-inside\" that changes the color of points that are inside the head.\r\n5. Adds HPI points\r\n\r\nStill todo:\r\n\r\n- [x] add tests\r\n- [x] actually add high res->low res decimation step\r\n\r\nUsing:\r\n```\r\nmne coreg --subjects-dir=~/mne_data/MNE-sample-data/subjects/ --subject sample --fif ~/mne_data/MNE-sample-data/MEG/sample/sample_audvis_raw.fif --trans ~/mne_data/MNE-sample-data/MEG/sample/sample_audvis_raw-trans.fif --head-opacity=0.5\r\n```\r\nOn current `master`:\r\n\r\n![master](https://user-images.githubusercontent.com/2365790/36623558-d0fe6fc2-18d3-11e8-9093-57f1854eda8c.png)\r\n\r\nOn this PR with options `--scale-by-distance --orient-to-surface`:\r\n\r\n![pr](https://user-images.githubusercontent.com/2365790/36623557-cdfcea88-18d3-11e8-9fee-bd7d651576f1.png)\r\n"},"comment":{"url":"https://api.github.com/repos/mne-tools/mne-python/issues/comments/369027980","html_url":"https://github.com/mne-tools/mne-python/pull/4966#issuecomment-369027980","issue_url":"https://api.github.com/repos/mne-tools/mne-python/issues/4966","id":369027980,"user":{"login":"agramfort","id":161052,"avatar_url":"https://avatars2.githubusercontent.com/u/161052?v=4","gravatar_id":"","url":"https://api.github.com/users/agramfort","html_url":"https://github.com/agramfort","followers_url":"https://api.github.com/users/agramfort/followers","following_url":"https://api.github.com/users/agramfort/following{/other_user}","gists_url":"https://api.github.com/users/agramfort/gists{/gist_id}","starred_url":"https://api.github.com/users/agramfort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agramfort/subscriptions","organizations_url":"https://api.github.com/users/agramfort/orgs","repos_url":"https://api.github.com/users/agramfort/repos","events_url":"https://api.github.com/users/agramfort/events{/privacy}","received_events_url":"https://api.github.com/users/agramfort/received_events","type":"User","site_admin":false},"created_at":"2018-02-27T21:13:24Z","updated_at":"2018-02-27T21:13:24Z","author_association":"OWNER","body":"I have an sample-fiducials.fif in my bem folder and still running:\n\nmne coreg --subjects-dir=~/mne_data/MNE-sample-data/subjects/ \\\n>     --subject sample --fif\n~/mne_data/MNE-sample-data/MEG/sample/sample_audvis_raw.fif \\\n>     --trans\n~/mne_data/MNE-sample-data/MEG/sample/sample_audvis_raw-trans.fif \\\n>     --head-opacity=0.5 --orient-to-surface --scale-by-distance\n--mark-inside\n\ndoes not work out of the box.\n\nlet's do a hangout tomorrow with share screen so you explain what I do\nwrong.\n"}}
{"actor":{"display_login":"agramfort"}}