Skip to content

Commit b8f8c48

Browse files
committed
pdf
1 parent 281347b commit b8f8c48

File tree

1 file changed

+22
-24
lines changed

1 file changed

+22
-24
lines changed

src/make_slice_screenshots.sh

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -66,38 +66,36 @@ montage -mode concatenate y_???.png -border 5 -bordercolor white -tile 2x3 -qual
6666
montage -mode concatenate z_???.png -border 5 -bordercolor white -tile 2x3 -quality 100 z_mont_%03d.png
6767

6868
# Pad and annotate with assessor name
69-
for i in ?_mont_???.png
70-
do convert -gravity Center ${i} -bordercolor white -border 20x20 \
71-
-background white -resize 1224x1554 -extent 1224x1554 -gravity NorthWest \
72-
-splice 0x30 -pointsize 18 -annotate +15+10 "${label_info}" ${i}
69+
for i in ?_mont_???.png; do
70+
convert \
71+
-size 1224x1584 xc:white \
72+
-gravity Center \( ${i} -resize 1194x1454 -geometry +0+0 \) -composite \
73+
-gravity SouthEast -pointsize 24 -annotate +20+20 "$the_date" \
74+
-gravity SouthWest -pointsize 24 -annotate +20+20 "$(cat $FREESURFER_HOME/build-stamp.txt)" \
75+
-gravity NorthWest -pointsize 24 -annotate +20+50 "${label_info}" \
76+
${i}
7377
done
7478

75-
7679
# Trim 3d screenshots
7780
for i in [lr]h_*.png;do convert $i -fuzz 1% -trim +repage t${i};done
7881

7982
# Create first page, 3Ds
8083
montage -mode concatenate \
81-
tlh_lat_aparc.png tlh_lat_pial.png tlh_lat_thick.png \
82-
trh_lat_aparc.png trh_lat_pial.png trh_lat_thick.png \
83-
tlh_med_aparc.png tlh_med_pial.png tlh_med_thick.png \
84-
trh_med_aparc.png trh_med_pial.png trh_med_thick.png \
85-
-tile 3x -quality 100 -background black -gravity center \
86-
-trim -border 5 -bordercolor black -resize 300x first_page.png
87-
88-
convert first_page.png \
89-
-background white -resize 1194x1479 \
90-
-extent 1194x1479 -bordercolor white -border 15 \
91-
-gravity SouthEast -background white -splice 0x15 -pointsize 16 \
92-
-annotate +15+10 "$(date)" -gravity SouthWest -annotate +15+10 \
93-
"$(cat $FREESURFER_HOME/build-stamp.txt)" \
94-
-gravity NorthWest -background white -splice 0x60 \
95-
-pointsize 24 -annotate +15+35 \
96-
'QA Summary - FreeSurfer recon-all' \
97-
-pointsize 18 -gravity NorthEast -annotate +15+10 \
98-
"${label_info}" \
99-
first_page.png
84+
tlh_lat_aparc.png tlh_lat_pial.png tlh_lat_thick.png \
85+
trh_lat_aparc.png trh_lat_pial.png trh_lat_thick.png \
86+
tlh_med_aparc.png tlh_med_pial.png tlh_med_thick.png \
87+
trh_med_aparc.png trh_med_pial.png trh_med_thick.png \
88+
-tile 3x -quality 100 -background black -gravity center \
89+
-trim -border 5 -bordercolor black -resize 300x first_page.png
10090

91+
convert \
92+
-size 1224x1584 xc:white \
93+
-gravity North \( first_page.png -resize 1194x1194 -geometry +0+100 \) -composite \
94+
-gravity NorthEast -pointsize 24 -annotate +20+50 "QA Summary - recon-all" \
95+
-gravity SouthEast -pointsize 24 -annotate +20+20 "$the_date" \
96+
-gravity SouthWest -pointsize 24 -annotate +20+20 "$(cat $FREESURFER_HOME/build-stamp.txt)" \
97+
-gravity NorthWest -pointsize 24 -annotate +20+50 "${label_info}" \
98+
first_page.png
10199

102100
# Concatenate into PDF
103101
convert \

0 commit comments

Comments
 (0)