Fixes make_scalp_surfaces#13024
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…into dev-headsurface
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…into dev-headsurface
for more information, see https://pre-commit.ci
…into dev-headsurface
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…into dev-headsurface
|
@vferat any way I can help with this one? |
|
Hey @larsoner, Sorry for the lack of responsiveness, projects are coming thick and fast and it's becoming difficult to find time to contribute. The remaining error is a difference between the default
I noticed that:
On main, tests skip the computation of However, on this PR tests recompute It seems that the EDIT: I can confirm that the output of Would it be ok to remove the validation step against the shipped |
larsoner
left a comment
There was a problem hiding this comment.
It seems that the seghead.mgz file from sample data is not the output of mkheadsurf -subjid sample -srcvol T1.mgz -thresh1 20 -thresh2 20. Could you confirm that ?
I hoped I would find it in https://github.com/search?q=repo%3Amne-tools%2Fmne-scripts+seghead&type=code but I don't. Similar calls there are just mkheadsurf -s ${SUBJECT}... but it could be on some (very!) old version of FreeSurfer so who knows.
On main, tests skip the computation of seghead.mgz (unwanted behavior) therefore sample-head-dense.fif is unchanged compared to the sample dataset -> test pass
Should we add a recompute_seghead=True (new default) that you could set to False for the purposes of the test? It would also go faster presumably...
Would it be ok to remove the validation step against the shipped seghead.mgz or update the seghead.mgz in MNE sample dataset ?
Updating the dataset doesn't seem worth it (better to preserve it as-is), I think it's okay to adjust the test. It would be great if we could assert the meshes are similar, but it doesn't seem trivial on a quick search (even with VTK) so I think it's okay to skip that part
Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
This may cause confusion with other parameters such as
I'v removed the test for now and I'll add it back it if we choose to add the |
I think as long as we say what |
|
I've added a I've also added back the surface checks when |
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Marijn van Vliet <w.m.vanvliet@gmail.com> Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
Reference issue (if any)
Fixes #13014.
What does this implement/fix?
Updates
make_scalp_surfacesto force regeneratingseghead.mgz,lh.segheadand{subject}-head-{{}}.fififoverwriteis set toTrue. Will raise an OSError if eitherseghead.mgz,lh.segheadand{subject}-head-{{}}.fifexists andoverwriteis set toFalseAdditional information
There are some edgy cases when mixing
overwriteandno_decimatewhich can lead to{subject}-head-medium.fif/{subject}-head-sparse.fifto be untouched whileseghead.mgz,lh.segheadand{subject}-head-dense.fifare regenerated.I tried to handle theses cases by always deleting
{subject}-head-medium.fif/{subject}-head-sparse.fififoverwrite=True(even ifno_decimate=True) and by raising and specific error ifoverwrite=False,no_decimate=Truebut{subject}-head-medium.fif/{subject}-head-sparse.fifexist.