You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here, despite the fact that we are only cutting the left hemisphere, it seems as though data for both hemispheres are added to blender. Presumably this is what causes the right hemispheres data to appear on the left (perhaps the left data is over-written by the right data).
Proposed solution.
in segment.py, hemi could be added as an argument to add_cutdata, as follows
Pardon the late reply here - the root issue is that no one in the original pycortex development team ever tried to make cuts based on anything besides volumetric functional localizer (mostly retinotopy) data, so this is all good-enough code. These fixes seem reasonable; I'd suggest you submit a pull request and we can test them out. Thanks!
sumiyaabdi
added a commit
to sumiyaabdi/pycortex
that referenced
this issue
Apr 22, 2022
Hi pycortex. I seem to have uncovered an issue that doesn't seem to have been raised so far. It overlaps somewhat with #398
Problem
To illustrate this problem clearly, here I add some data that should show blue for the left hemisphere and red for the right hemisphere.
Here is the proof, in cortex.webshow()
However. When I call the cut_surface command, specifying the left hemisphere:
we see that the left hemisphere is coloured red, not blue as in the webviewer.
Culprit lines
My guess is that the problem lies here:
pycortex/cortex/blender/__init__.py
Lines 97 to 100 in 499965a
Here, despite the fact that we are only cutting the left hemisphere, it seems as though data for both hemispheres are added to blender. Presumably this is what causes the right hemispheres data to appear on the left (perhaps the left data is over-written by the right data).
Proposed solution.
pycortex/cortex/segment.py
Line 185 in 499965a
a.
pycortex/cortex/blender/__init__.py
Line 43 in 499965a
b.
pycortex/cortex/blender/__init__.py
Line 65 in 499965a
pycortex/cortex/blender/__init__.py
Lines 86 to 104 in 499965a
with something like this, to only add one set of data depending on the hemi argument.
This seems to produce the desired result.
Since the code that makes python talk to blender is a little confusing to me - these are tentative suggestions, but they seem to do the job.
Happy to address this myself - but any comments welcome.
The text was updated successfully, but these errors were encountered: