Error 'add scouts to atlas'

Hello,

I have an issue when I want to import a MNI scout from spm12 (.nii) in a new atlas. I selected 'Volume mask or atlas (dilated, MNI space)' and then I have this error :

Capture d’écran 2021-03-18 140306

It's the first time I have this issue, I have never had it before. The only thing that has changed is that I updated my version of brainstorm. I never had this error with the old version of brainstorm.

I try with many .nii scouts and with different subjects. I quit brainstorm and then reopen it but it's always the same error.

Thank you in advance for your help.

I fixed the source of the error (update Brainstorm to get the fix):
https://github.com/brainstorm-tools/brainstorm3/commit/767ec9bdbd2636009b20f8803ee44719b731a54b

But I don't understand how you got to this point in the code.
This is a switch case for hdr/img old Analyze file format... Is the file you are reading with a .hdr or .img extension? Is so, time to update to .nii files.