3dSurf2Vol

I want to map data from a surface domain(te_normalized at individual level) to an AFNI volume domain(group level),but it doesn’t work. The script is as follows:

cd $spath/sub01/surface_files
foreach hemi (lh rh)
3dSurf2Vol
-spec $spath/group/freesurfer/SUMA/subAvg_“$hemi”+tlrc.spec
-surf_A smoothwm
-surf_B pial
-sv $spath/group/subAvg_SurfVol_at+tlrc.nii.gz
-grid_parent “$spath”/“$sub”/orig_files/ts_normalized_at+tlrc.nii.gz
-sdata_1D “$hemi”_ts_normalized.1D
-datum float
-map_func max_abs
-f_steps 15
-f_index voxels
-f_p1_fr -0.2 -f_pn_fr 0.4
-prefix ./“$hemi”_ts_normalized_sb
end

What error are you getting?

And is this really the name of the spec file?


$spath/group/freesurfer/SUMA/subAvg_"$hemi"+tlrc.spec

→ I am surprised to see the “+tlrc” in it.

–pt

Yes, I’m sure it is right.
And, when i use the same script to map GLM_glt surf_file to the AFNI volume domain(group level), it works!
Why?

foreach hemi (lh rh)
1dcat “$hemi”“$fn”.1D[0] “$hemi”“$fn”.1D[6…$n] > “$hemi”“$fn”.dset
3dSurf2Vol
-spec $spath/group/freesurfer/SUMA/subAvg
"$hemi"+tlrc.spec
-surf_A smoothwm
-surf_B pial
-sv $spath/group/subAvg_SurfVol_at+tlrc.nii.gz
-grid_parent “$spath”/“$sub”/GLM_glts_at+tlrc.nii.gz
-sdata_1D “$hemi”“$fn”.dset
-datum float
-map_func max_abs
-f_steps 15
-f_index voxels
-f_p1_fr -0.2 -f_pn_fr 0.4
-prefix ./“$hemi”
“$fn”_sb

well, without providing an error message to work with…

–pt

No any message…

Is it a shell syntax problem? I don’t think the square bracket selectors are being escaped appropriately:


1D\[0]

It should be “[0]”, etc.

–pt

Would you please clarify what you mean by “it doesn’t work”?
You said there was no error message, but in what way does
it not work? Is there no output? Is it in the wrong location?
How are you detecting this?

Do the -sdata_1D input files have the same size?
Is the 1dcat comand just grabbing columns 6 and on from
the same ts_normalized.1D dataset, or is it different? Do
they have the same lengths and node correspondence?

Anyway, these commands look fine, so more information
is needed to say anything useful. Please start by describing
how it does not seem to work.

  • rick