Skip to content

ENH: Allow control of volume interp#13966

Open
larsoner wants to merge 3 commits into
mne-tools:mainfrom
larsoner:interp
Open

ENH: Allow control of volume interp#13966
larsoner wants to merge 3 commits into
mne-tools:mainfrom
larsoner:interp

Conversation

@larsoner

Copy link
Copy Markdown
Member

Currently we only allow linear interpolation of volumes during visualization. This adds nearest-neighbor support.

Also fixes a minor (mostly visual) bug with alignment when resampling to a higher-res volume, which I noticed because resolution=None (native) should look identical to resolution=1. (upsample to 1mm) when using nearest-neighbor interp. They don't look the same on main but they do here. We could in principle try to do some image-based testing but it would be slow and likely fragile.

There are some annoying gymnastics around origin and how to use it, but I checked visually that everything lines up properly. I also intentionally left in some debugging code (with comments) for the next time we have to sort out this sort of thing.

@larsoner

Copy link
Copy Markdown
Member Author

A couple of rendered examples:

PSF example LCMV tutorial
image image

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.

1 participant