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
We known that NaNs are not handled well by the WebGL viewer for Vertex objects. However, it seems that the viewer can handle NaNs perfectly fine for RGBVertex objects. We should investigate this difference and possibly figure out a fix for the Vertex objects.
Example:
importcorteximportnumpyasnpvtx=cortex.Vertex.random("fsaverage")
# get an roi to mask out roi=cortex.get_roi_verts("fsaverage", roi="IPS0")["IPS0"]
vtx.data[roi] =np.nancortex.webgl.show({"vertex": vtx, "rgbvertex": vtx.raw})
produces
The text was updated successfully, but these errors were encountered:
#458 should fix the problem with VertexRGB objects. However, that PR doesn't fix the problem with Vertex objects. I explored the code for a while, and I think the problem might be in how the JS functions load the data and treat nans. But I'm still unsure about how the JS code works, so we'll have to keep this issue open...
mvdoc
changed the title
Inconsistent handling of nans by WebGL viewer for Vertex vs. RGBVertex objects
Inconsistent handling of nans by WebGL viewer for Vertex vs. VertexRGB objects
Jul 13, 2022
We known that NaNs are not handled well by the WebGL viewer for
Vertex
objects. However, it seems that the viewer can handle NaNs perfectly fine forRGBVertex
objects. We should investigate this difference and possibly figure out a fix for theVertex
objects.Example:
produces
The text was updated successfully, but these errors were encountered: