Skip to content

Inconsistent handling of nans by WebGL viewer for Vertex vs. VertexRGB objects #455

@mvdoc

Description

@mvdoc

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:

import cortex
import numpy as np

vtx = cortex.Vertex.random("fsaverage")
# get an roi to mask out 
roi = cortex.get_roi_verts("fsaverage", roi="IPS0")["IPS0"]
vtx.data[roi] = np.nan

cortex.webgl.show({"vertex": vtx, "rgbvertex": vtx.raw})

produces
image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions