Closed tmspvn closed 2 years ago
It might be possible in theory, but I'm not entirely sure. Is there a specific use case that you have in mind? Because if you just want to swap out the default surfaces for your surfaces of choice, that would be much easier and I could walk you through the steps you would need to take to do it (I just did it myself, to be sure).
As far as I can tell, to specify the surface files programmatically would require editing the data inside the Human.scene
file to change which surface file is currently loaded in the scene(s) for which you wish to auto-generate images. I poked around a bit but there is a lot going on inside scene files and I don't really understand the structure...
I do work with neonates that is why I need to change the surface!
I tried myself to swap the surface and the .scene file but it did not work. Assuming I want to do it non-programmatically what would be the way?
are you able to manually open your surface file in Connectome Workbench and visualize a brain map on it (ie, outside of wbplot)? and do you know if your surface file uses a standard 32k mesh?
Of course I do, my surface are not 32k meshes but I know how to resample them in case of need
Sorry for the delay in getting back to you. Maybe it would help if I explained how wbplot
actually works. When you provide dscalar or pscalar values, those data are written (programmatically) to neuroimaging files which have been pre-loaded into a scene file. To change the surface files, you just need to change the surface files which are pre-loaded in the scenes inside the scene file. All of the data files exist in the data directory inside the package.
If you want to change the surface file, the most straightforward way to do it would probably be the following:
wbplot
package. If you don't know where it is, open an interactive Python shell and run import wbplot
followed by print(wbplot.__file__)
.Human.scene
file from the data directory in Connectome Workbench and show the scene you plan to use (e.g., bilateral cortex dense).HumanCorticalParcellations
directory.scene.zip
file. The easiest way to do this is probably to unzip the current scene.zip file, replace the contents of that directory which you have changed (in particular, the HumanCorticalParcellations directory and the new scene file), and then re-zip it.For this procedure to work I think you'll need your data to be on a 32k mesh. Otherwise, you'll need to change both the surface file as well as the template file.
Thank you!
I have followed the suggestions of the developers of connectome workbench and it seems .scene files just contains a lot of info regarding the connectome workbench interface. Hence, by just changing the file names (surfaces and metrices) inside the .scene file you can change systematically what is being plotted
Would be possible to add the ability to change S1200.L.very_inflated_MSMAll.32k_fs_LR.surf.gii (or right) to an arbitrary .surf.gii?