#!/bin/tcsh -f if ("$1" == "-clean") then \rm -f std.lh.smoothwm.nodelist.1D.coord std.lh.smoothwm.facesetlist.1D.topo \rm -f std.lh.smoothwm.nodelist.nz.1D.coord \rm -f nz_smooth_demo.spec \rm -f NodeList_sm100.1D goto END endif #create 1D format surface files using ConvertSurface if ( ! -f std.lh.smoothwm.nodelist.1D.coord) then ConvertSurface -i_fs ../SurfData/SUMA/std.lh.smoothwm.asc \ -o_vec std.lh.smoothwm.nodelist std.lh.smoothwm.facesetlist else echo "Reusing std.lh.smoothwm.nodelist.1D.coord" endif #add noise to the coordinates of the surface if ( ! -f std.lh.smoothwm.nodelist.nz.1D.coord ) then 1deval -a 'std.lh.smoothwm.nodelist.1D.coord[0]' \ -expr 'gran(0,1) * 1 + a' \ > c0.1D 1deval -a 'std.lh.smoothwm.nodelist.1D.coord[1]' \ -expr 'gran(0,1) * 1 + a' \ > c1.1D 1deval -a 'std.lh.smoothwm.nodelist.1D.coord[2]' \ -expr 'gran(0,1) * 1 + a' \ > c2.1D 1dcat c0.1D c1.1D c2.1D > std.lh.smoothwm.nodelist.nz.1D.coord \rm -f c?.1D endif #create a spec file for the surfaces created if ( -f nz_smooth_demo.spec) rm -f nz_smooth_demo.spec quickspec -tn 1D std.lh.smoothwm.nodelist.1D.coord \ std.lh.smoothwm.facesetlist.1D.topo \ -tn 1D std.lh.smoothwm.nodelist.nz.1D.coord \ std.lh.smoothwm.facesetlist.1D.topo \ -spec nz_smooth_demo.spec #launch suma set talkopt = "-npb `afni -available_npb_quiet` -pif SSD_demo" @Quiet_Talkers -pif SSD_demo suma ${talkopt} -spec nz_smooth_demo.spec -niml & set mm = `prompt_user -pause "When SUMA is up, hit Enter for geom. smoothing"` if ( ! $mm) goto END DriveSuma ${talkopt} -com viewer_cont -viewer_size 600 600 DriveSuma ${talkopt} -com viewer_cont -key 'ctrl+n' DriveSuma ${talkopt} -com viewer_cont -key '.' \ -key 'R' \ -key 'b' set opt = '' #if ( -f node_mask_out_Del2.1D) set opt = "-b_mask node_mask_out_Del2.1D" if ( -f NodeList_sm100.1D) rm -f NodeList_sm100.1D SurfSmooth ${talkopt} -spec nz_smooth_demo.spec \ -surf_A std.lh.smoothwm.nodelist.nz.1D.coord \ -met LM -Niter 100 -kpb 0.015 \ -output NodeList_sm100.1D -iw Equal \ $opt -talk_suma #And turn off recording DriveSuma ${talkopt} -com viewer_cont -key 'R' END: