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
I am attempting to visualize a Dataset containing multiple Vertex2D objects on a cortical surface. However, I have encountered some bugs when attempting to do this.
Behavior
First, if two or more Vertex2D objects have a dimension in common, webgl.show crashes (in my case, they have different first dimension, to be shown as color, and same second dimension, to be shown as alpha). This appears to be because in the case of identical dimensions, multiple BrainData objects are stored in Dataset.uniques under the same name, which crashes the loop on lines 71-79 of webgl/data.py when it attempts to iterate a second time over a name it already used, and that image has been substituted by a BytesIO().read() object (line 79).
Workaround and another bug
A simple workaround for this crash is introducing negligible differences in the second dimension of the Vertex2D objects, so that all BrainData objects are stored in dataset.uniques with different names, preventing the crash. However, when doing this, for some reason the first dimension is plotted identically for some or all objects, even if the underlying data is different (which i can see correctly if I plot the different Vertex2D objects in separate webgl.show windows/datasets).
Any support or workaround to correctly plot datasets with multiple Vertex2D objects would be much appreciated. Thank you very much.
Best,
Marco Aqil
The text was updated successfully, but these errors were encountered:
A (hacky) solution to this issue is to create Vertex2D objects, and then create a dataset with their .raw attributes rather than the Vertex2D themselves. This prevents colormap/bar interactivity, but allows multiple 2D datasets to be plotted correctly in the same webgl window.
Hi,
I am attempting to visualize a Dataset containing multiple Vertex2D objects on a cortical surface. However, I have encountered some bugs when attempting to do this.
Behavior
First, if two or more Vertex2D objects have a dimension in common, webgl.show crashes (in my case, they have different first dimension, to be shown as color, and same second dimension, to be shown as alpha). This appears to be because in the case of identical dimensions, multiple BrainData objects are stored in Dataset.uniques under the same name, which crashes the loop on lines 71-79 of webgl/data.py when it attempts to iterate a second time over a name it already used, and that image has been substituted by a BytesIO().read() object (line 79).
Workaround and another bug
A simple workaround for this crash is introducing negligible differences in the second dimension of the Vertex2D objects, so that all BrainData objects are stored in dataset.uniques with different names, preventing the crash. However, when doing this, for some reason the first dimension is plotted identically for some or all objects, even if the underlying data is different (which i can see correctly if I plot the different Vertex2D objects in separate webgl.show windows/datasets).
Any support or workaround to correctly plot datasets with multiple Vertex2D objects would be much appreciated. Thank you very much.
Best,
Marco Aqil
The text was updated successfully, but these errors were encountered: