root / bin / image2geometry / orient_sepals.sh @ 16
Historique | Voir | Annoter | Télécharger (769 octet)
1 |
#! /bin/bash |
---|---|
2 |
|
3 |
# Usage: |
4 |
# ------ |
5 |
# ./orient_sepals.sh directory filetype |
6 |
# filetype = '.tif' or '.inr.gz' |
7 |
|
8 |
|
9 |
indir=$1 |
10 |
filetype=$2 |
11 |
imagetype=$3 |
12 |
|
13 |
outdir=$indir'_oriented-sepals' |
14 |
|
15 |
mkdir $indir'/'$outdir |
16 |
|
17 |
cd $indir |
18 |
|
19 |
logfile='orient_sepals-'$indir'.log' |
20 |
date > $logfile |
21 |
echo '--------------------------' >> $logfile |
22 |
|
23 |
|
24 |
for file in *$filetype |
25 |
do |
26 |
echo '--------------------------' >> $logfile |
27 |
echo $file >> $logfile |
28 |
echo $file $outdir |
29 |
echo '--------------------------' >> $logfile |
30 |
if test $imagetype=="grey" |
31 |
then |
32 |
echo 'orienting grey image '$file |
33 |
orient_sepal.py $file $outdir $imagetype |
34 |
else |
35 |
echo 'orienting segmented image '$file |
36 |
orient_sepal.py $file $outdir |
37 |
fi |
38 |
echo '--------------------------' >> $logfile |
39 |
done |
40 |
|
41 |
|
42 |
|
43 |
#scp */*_oriented.inr.gz $oriented |
44 |
|
45 |
cd .. |