3dVol2Surf error


I was trying to use the following script to map volume data to surface, but got some errors.

3dVol2Surf -spec ${wf}/${s}/anat/surface_info/SUMA/${s}_lh.spec
-surf_A smoothwm
-surf_B pial
-sv ${s}_surf_volm_aligned+orig
-grid_parent r06_detrend.nii.gz
-map_func ave
-f_steps 10
-f_index nodes
-out_niml ${wf}/${s}/${thesession}/${thecond}/${s}_lvol2surf.niml.dset

Error SUMA_WriteDset_eng (suma_datasets.c:11050):
Failed to open stream
Error SUMA_WriteDset_eng (suma_datasets.c:102):
Failed to write niml element
Error SUMA_WriteDset_eng (suma_datasets.c:103):
Failed writing dataset.

I think there might be something wrong with the dataset of -sv or -grid_partent, but I’m not sure and I don’t know how to fix the errors. Could anyone give me some tips? Thanks in advance !

I expect that you are running it from a directory that you do not have “write” permissions for.

What is the output of:

ls -ld .
  • rick

Hi rick,
Thanks for your response.

The output is:
drwxrwxrwx 1 vpp vpp 20480

To be sure, it should be for the output directory:

ls -ld ${wf}/${s}/${thesession}/${thecond}

Or what what what you showed? Can you verify being able to write a file to that directory?


  • rick

Yes, I ran ls -ld in the output directory and got ‘drwxrwxrwx 1 vpp vpp 20480’. I can also create or write a file to that directory.

All fMRI data and output were put in D:\ of Windows system, I think they are free to read/write in Linux. I’ve never met a permission problem when working with those data. Is there any other reason?

Thanks !

Are there any spaces in the directories that lead there? If you would like, you can send me email with a full path. I will look into updating that error message to include more information.

  • rick

Thanks! Following is the full script. BTW, I got another error if using the full path of surface data, please look at the end.

cd ${wf}/${s}/anat/surface_info/surf/

3dVol2Surf -spec ${wf}/${s}/anat/surface_info/SUMA/${s}lh.spec
-surf_A smoothwm
-surf_B pial
-sv ${wf}/${s}/${thesession}/result
-grid_parent ${wf}/${s}/${thesession}/result
-map_func nzave
-f_steps 10
-f_index nodes
-out_niml ${wf}/${s}/${thesession}/${thecond}/${s}_lvol2surf.niml.dset

with full path

-surf_A ${wf}/${s}/anat/surface_info/surf/smoothwm
-surf_B ${wf}/${s}/anat/surface_info/surf/pial
** surface name ‘/media/vpp/DATA/sbj05/anat/surface_info/surf/smoothwm’ not found

but the dataset lh.smoothwm, rh.smoothwm, lh.smoothwm.asc, rh.smoothwm.asc are all in surf directory.