Nilearn cannot statistically threshold surface images

Hi, thank you for the new features!

I am using 1st and 2nd level models, which are working pretty well with SurfaceImages.
But I could not apply statistical thresholds on them.

It seems that non_parametric_inference is already accepting SurfaceImage as input, but I am getting the error message:

TypeError: Data given cannot be loaded because it is not compatible with nibabel format:
<SurfaceImage (204…

My input is a list of SurfaceImage, which worked well in the SecondLevelModel.

Am I doing something wrong?

Best,

Thx for reporting. Indeed 1st and second level model on the surface are pretty recent, and you are pointing to some not yet implemented part. We’re going to add it in the next release.
Sorry for the inconvenience.
Best,
Bertrand

To be clear you specifically want the non_parametric_inference approach?

At the moment the thresholding we have of surfaces is done at plot time :

Am currently working on adapting threshol_img to accept SurfaceImage

I suspect that threshold_stats_img would be next.

I think cluster level inference will come much later as it not as easy to implement.

I understand that cluster level inference might take more time to be implemented.

However, any kind of statistical thresholding for surface (for example threshold_stats_img that you mentioned) would be of great value.

Looking forward to the these updates.

best,