Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set default interpolation of webgl server #346

Open
Gilles86 opened this issue Nov 1, 2019 · 2 comments
Open

Set default interpolation of webgl server #346

Gilles86 opened this issue Nov 1, 2019 · 2 comments

Comments

@Gilles86
Copy link
Contributor

Gilles86 commented Nov 1, 2019

Hi,

I'm a big fan of PyCortex and used it at lot for a 7T fMRI data set we collected, visualizing ocular dominance columns.

You can see some results for example here:
http://aeneas.labs.vu.nl/odc/sub-06/

I want to include these renderings as supplemental material to the paper. However, I think the rendering looks much better when it uses "trilinear" interpolation, instead of nearest neighbor interpolation. Is there a way to make this the default interpolation when you make the static webpage using cortex.webgl.make_static?

Cheers,
Gilles

@tknapen
Copy link

tknapen commented Dec 11, 2019

@alexhuth, I remember we talked about similar issues at some point, any ideas? Thanks!

@alexhuth
Copy link
Contributor

Hey folks -- so afaik there's no config setting for this, but you should be able to control it programmatically. That means you could add a line to your template HTML file that sets the sampler as soon as the brain is loaded (i.e. in the onload event). It should look something like this:
viewer.ui.set("surface.{subject}.sampler", "trilinear")
where {subject} is replaced by your subject identifier.

This works for me on a test viewer, but unfortunately doesn't seem to work on the viewer @Gilles86 linked because your subject identifier (odc.tr) has a period in it, and dat.gui uses periods as separators. There might be a workaround for this, but in the meantime I'd recommend either using a different subject identifier or setting the parameter anonymize=True when you call cortex.webgl.make_static, which should change the subject identifier to "S1".

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

No branches or pull requests

3 participants