I think you have a typo on this line:

current_sphere_=standard_mesh_atlases/resample_fsaverage/fs_LR-deformed_to-fsaverage.${h}.sphere.164k_fs_LR.surf.gii

Peace,

Matt.

From: Nicola Toschi <[email protected]<mailto:[email protected]>>
Date: Friday, October 27, 2017 at 8:16 AM
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>, Matt 
Glasser <[email protected]<mailto:[email protected]>>
Subject: Fwd: Mapping Myeling maps to fsaverage space - again....

Hi Matt,

I am sorry for writing directly (I am copying the list though).

I have been trying to post this message for a couple of days now, but it's not 
showing up. Any idea what I am doing wrong?

Thanks!

Nicola

-------- Forwarded Message --------
Subject:        Mapping Myeling maps to fsaverage space - again....
Date:   Fri, 27 Oct 2017 13:07:51 +0200
From:   Nicola Toschi <[email protected]><mailto:[email protected]>
To:     hcp-users 
<[email protected]><mailto:[email protected]>



Hello list,

I am sorry to revive an old questions (nad one that you have written a
wiki for), but I keep not being able to get my script to resample native
myelin maps to fsaverage to work (please see below for test script on 1
subject).

I'd be most grateful if anyone could take a look and let me knof if
anything jumps out. The error message i keep getting is only in step 5,
and it is

"ERROR: input metric has different number of nodes than input sphere"

Thank you very much in advance!

nicola

______________________________________________________________________________

base=/run/media/nicola/Seagate_Backup_Plus
sub=100307
for h in L R
do

#step 1
echo  "Step 1" ${h}

sphere_in=${sub}/MNINonLinear/Native/${sub}.${h}.sphere.MSMAll.native.surf.gii
sphere_project_to=${base}/standard_mesh_atlases/fsaverage.${h}_LR.spherical_std.164k_fs_LR.surf.gii
sphere_unproject_from=${base}/standard_mesh_atlases/resample_fsaverage/fs_LR-deformed_to-fsaverage.${h}.sphere.164k_fs_LR.surf.gii
sphere_out=${sub}.L.sphere.fsaverage.native.surf.gii

wb_command -surface-sphere-project-unproject ${sphere_in}
${sphere_project_to} ${sphere_unproject_from} ${sphere_out}

#step 2
echo "step 2" ${h}

surface_in=${sub}/T1w/Native/${sub}.${h}.midthickness.native.surf.gii
current_sphere=${sphere_out}
new_sphere=standard_mesh_atlases/resample_fsaverage/fsaverage_std_sphere.${h}.164k_fsavg_${h}.surf.gii
surface_out=${sub}/T1w/${sub}.${h}.midthickness.164k_fs_${h}.surf.gii

surface_out2_uselater=${surface_out}

wb_command -surface-resample ${surface_in} ${current_sphere}
${new_sphere} BARYCENTRIC ${surface_out}


#step 3
echo "step 3" ${h}


surface_in=${sub}/T1w/Native/${sub}.${h}.midthickness.native.surf.gii
current_sphere=${sub}/MNINonLinear/Native/${sub}.${h}.sphere.MSMAll.native.surf.gii
new_sphere=${base}/standard_mesh_atlases/fsaverage.${h}_LR.spherical_std.164k_fs_LR.surf.gii
surface_out=${sub}/T1w/${sub}.${h}.midthickness_MSMALL.164k_fs_LR.surf.gii

surface_out3_uselater=${surface_out}

wb_command -surface-resample ${surface_in} ${current_sphere}
${new_sphere} BARYCENTRIC ${surface_out}

done

echo "step 4"
cifti_in=${sub}/MNINonLinear/${sub}.MyelinMap_BC_MSMAll.164k_fs_LR.dscalar.nii
metric_out_left=${sub}/T1w/${sub}.MyelinMap_BC_MSMAll.164k_fs_LR_L.func.gii
metric_out_right=${sub}/T1w/${sub}.MyelinMap_BC_MSMAll.164k_fs_LR_R.func.gii
wb_command -cifti-separate ${cifti_in} COLUMN -metric CORTEX_LEFT
${metric_out_left} -metric CORTEX_RIGHT ${metric_out_right}


for h in L R

do

echo "step 5" ${h}

#metric_in=${sub}/MNINonLinear/${sub}.MyelinMap_BC_MSMAll.164k_fs_LR.dscalar.nii
metric_in=${sub}/T1w/${sub}.MyelinMap_BC_MSMAll.164k_fs_LR_${h}.func.gii
current_sphere_=standard_mesh_atlases/resample_fsaverage/fs_LR-deformed_to-fsaverage.${h}.sphere.164k_fs_LR.surf.gii
new_sphere=standard_mesh_atlases/resample_fsaverage/fsaverage_std_sphere.${h}.164k_fsavg_${h}.surf.gii
metric_out=${sub}/T1w/${sub}.MyelinMap.${h}.164k_fsavg_6.func.gii
current_area=${surface_out3_uselater}
new_area=${surface_out2_uselater}

echo "NEW AREA is "${new_area}

wb_command -metric-resample ${metric_in} \
${current_sphere} \
${new_sphere} \
ADAP_BARY_AREA \
${metric_out} \
-area-surfs \
${current_area} \
${new_area}

done
______________________________________________________________________________

nicola@janus:/run/media/nicola/Seagate_Backup_Plus> bash map.sh
Step 1 L
step 2 L
step 3 L
Step 1 R
step 2 R
step 3 R
step 4
step 5 L
NEW AREA is 100307/T1w/100307.R.midthickness.164k_fs_R.surf.gii

While running:
/usr/local/workbench/bin_rh_linux64/../exe_rh_linux64/wb_command
-metric-resample
100307/T1w/100307.MyelinMap_BC_MSMAll.164k_fs_LR_L.func.gii
100307/MNINonLinear/Native/100307.R.sphere.MSMAll.native.surf.gii
standard_mesh_atlases/resample_fsaverage/fsaverage_std_sphere.L.164k_fsavg_L.surf.gii
ADAP_BARY_AREA 100307/T1w/100307.MyelinMap.L.164k_fsavg_6.func.gii
-area-surfs 100307/T1w/100307.R.midthickness_MSMALL.164k_fs_LR.surf.gii
100307/T1w/100307.R.midthickness.164k_fs_R.surf.gii

ERROR: input metric has different number of nodes than input sphere

step 5 R
NEW AREA is 100307/T1w/100307.R.midthickness.164k_fs_R.surf.gii

While running:
/usr/local/workbench/bin_rh_linux64/../exe_rh_linux64/wb_command
-metric-resample
100307/T1w/100307.MyelinMap_BC_MSMAll.164k_fs_LR_R.func.gii
100307/MNINonLinear/Native/100307.R.sphere.MSMAll.native.surf.gii
standard_mesh_atlases/resample_fsaverage/fsaverage_std_sphere.R.164k_fsavg_R.surf.gii
ADAP_BARY_AREA 100307/T1w/100307.MyelinMap.R.164k_fsavg_6.func.gii
-area-surfs 100307/T1w/100307.R.midthickness_MSMALL.164k_fs_LR.surf.gii
100307/T1w/100307.R.midthickness.164k_fs_R.surf.gii

ERROR: input metric has different number of nodes than input sphere

nicola@janus:/run/media/nicola/Seagate_Backup_Plus>









_______________________________________________
HCP-Users mailing list
[email protected]
http://lists.humanconnectome.org/mailman/listinfo/hcp-users

Reply via email to