a few things:
If you want/nee to use
gii, you can convert the
vtk files respectively.
You can check mindboogle’s respective code for ideas and a possible point to start.
Even though the assumptions for these approaches are outlined clearly (smoothing, linearity, error terms, euler characteristic, etc.), they are a big pill to swallow and in the majority of cases never checked before applying these techniques. In a lot of cases, alternative procedures would actually be more appropriate.
All this not even includes the voxel vs vertices differences …
It’s less about tailoring it specifically to
nilearn (which is also a statistical software), but to include a
vtk into a
format that is also supported by
nilearn (and other software). However, this goes into the whole
standardizing surfaces discussion. “Simple” depends I guess…as mentioned above: check
mindboggle's freesurfer to vtk functions to get an idea. You could also try to read the
vtk files with the
mindboggle functions and then use nibabel to write a
gii file, but given the structure of
surface files this might be a not-super-fun endeavor.
Tagging the experts @jeromedockes, @binarybottle, @bthirion, @tbazeille and @effigies for more experienced insights.
HTH, best, Peer