| 1 |
#!/bin/csh |
| 2 |
# This script is used to fill the image db with the images |
| 3 |
# submitted by vendors for RSNA95. It assumes a certain |
| 4 |
# directory layout. |
| 5 |
# Usage is: fillImageDBScript directory database |
| 6 |
# where: directory is the directory holding the studies to be placed |
| 7 |
# in the image database (by vendor). |
| 8 |
# database is the name of the image DB to hold the image information. |
| 9 |
|
| 10 |
if ($2 == "") then |
| 11 |
echo "Usage: $0 directory database" |
| 12 |
goto abort |
| 13 |
endif |
| 14 |
|
| 15 |
cd $1 |
| 16 |
foreach i (*) |
| 17 |
echo $i |
| 18 |
if (-d $i) then |
| 19 |
fillImageDB -o $i $2 $1/$i/*/* |
| 20 |
if ($status != 0) then |
| 21 |
echo fillImageDB failed |
| 22 |
goto abort |
| 23 |
endif |
| 24 |
else |
| 25 |
echo $i is not a directory |
| 26 |
endif |
| 27 |
end |
| 28 |
|
| 29 |
exit 0 |
| 30 |
|
| 31 |
abort: |
| 32 |
exit 1 |