Hi,
So far I have been able to take my ?h.inflated file and turn it into a label file from my vertices of interest. That is, what I thought are my vertices of interest, namely a closed path around the caudal temporal pole. Given one vertex point I manually choose I want to generate a list of vertices holding 'z' constant and ordered in a clock (-y to +y). While I am getting vertices, the label I am getting is in the occipital lobe. Even after manipulating the numbers and vertices I still cannot manage to put a label on the TP, let alone outside the occipital lobe. Any thoughts and comments you may have would be greatly appreciated. Thanks! ~Aaron
<---begin script here (I am trying to make this work for one subject)--->
#!/bin/tcsh -ef
# acquire all vertices from lh.inflated file (when I execute this script I replace $subj with the actual subject, so this line of code works)
mris_convert $subj/surf/lh.inflated ~/Desktop/test.asc
# extract vertices outlining the temporal pole caudal border given constant 'z.'
# The constant 'z' I think exists only once; other points along the path have a slightly different 'z'.
# Therefore, I give a very small range of 'z' values that I hope are close enough to represent the caudal border
# The 'z' coordinate is -61.0105, so search from -62 to -61
# sort the second column, which contains 'y' values
cat ~/Desktop/test.asc | awk '{ if($3 > -62 && $3 < -61) print $1, $2, $3, $4}' | sort -n -k2 > ~/Desktop/extract.asc
#echo header 1st line, label information, into label file
echo '#! label , from subject $SUBJ/ vox2ras=TkReg coords=white' > ~/Desktop/caudal_border.label
#echo header 2nd line, the number of ROI vertices, into label file
cat ~/Desktop/extract.asc | awk 'END{print NR}' >> ~/Desktop/caudal_border.label
#echo ROI vertices into label file with number lines (cat -n) substituting for vertex numbers
cat -n ~/Desktop/extract.asc >> ~/Desktop/caudal_border.label
#mris_anatomical_stats the label file -- to be written once appropriate label has been acquired