Commit 6e1baa5c authored by Bo-Chun Chen's avatar Bo-Chun Chen
Browse files

Add fsqc-lgi file

parent b7f92997
#!/bin/bash
echo "<html>" > index.html
echo "<table>" >> index.html
for sub in $(ls ${SUBJECTS_DIR});
do
echo "sclv_read_from_volume 0 "$sub"/surf/lh.pial_lgi 1" > tmp.tcl
echo "redraw" >>tmp.tcl
echo "save_tiff "$sub".lh.lat.hr.tif" >>tmp.tcl
echo "rotate_brain_y 180.0" >>tmp.tcl
echo "redraw" >>tmp.tcl
echo "save_tiff "$sub".lh.med.hr.tif" >>tmp.tcl
echo "exit 0" >>tmp.tcl
tksurfer $sub lh inflated -tcl tmp.tcl
echo "sclv_read_from_volume 0 "$sub"/surf/rh.pial_lgi 1" > tmp.tcl
echo "redraw" >>tmp.tcl
echo "save_tiff "$sub".rh.lat.hr.tif" >>tmp.tcl
echo "rotate_brain_y 180.0" >>tmp.tcl
echo "redraw" >>tmp.tcl
echo "save_tiff "$sub".rh.med.hr.tif" >>tmp.tcl
echo "exit 0" >>tmp.tcl
tksurfer $sub rh inflated -tcl tmp.tcl && {
echo "<tr>" >> index.html
echo "<td><a href=\"file:"$sub".lh.lat.hr.png\"><img width=\"300\" src=\""$sub".lh.lat.hr.png\"></a></td>" >> index.html
echo "<td><a href=\"file:"$sub".lh.med.hr.png\"><img width=\"300\" src=\""$sub".lh.med.hr.png\"></a></td>" >> index.html
echo "<td><a href=\"file:"$sub".rh.lat.hr.png\"><img width=\"300\" src=\""$sub".rh.lat.hr.png\"></a></td>" >> index.html
echo "<td><a href=\"file:"$sub".rh.med.hr.png\"><img width=\"300\" src=\""$sub".rh.med.hr.png\"></a></td>" >> index.html
echo "</tr>" >> index.html
echo "<tr>" >> index.html
echo "<td colspan=4><center>"$sub"</center><br></td>" >> index.html
echo "</tr>" >> index.html
}
rm tmp.tcl
done;
echo "</table>" >> index.html
echo "</html>" >> index.html
# Convert tif to PNG and remove TIFF files
for f in *.tif; do
echo "Converting $f";
convert "$f" "$(basename "$f" .tif).png";
rm $f
done
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment