Debian Codegraph @

apps/scripts/create_icons

raw
1 #!/bin/csh
2 #
3 # Intent: Script for creating icon database for all studies in common area
4 # $Revision: 1.8 $
5
6 echo This is the top level script for creating the files needed for the
7 echo print_mgr application. It invokes a separate script for each study
8 echo that we wish to include in the print demonstration. The parent
9 echo directory for the source files is variable. Each study directory
10 echo is hard-coded.
11
12 set SRC = /dicomctnc/release-2.7/images
13 set DST = /dicomctnc/print
14
15 echo ""
16 echo The default root directory for source images is
17 echo " " $SRC
18 echo ""
19 echo You can change this default at this point by entering a new
20 echo directory name. You can use the default by hitting return.
21 echo ""
22 echo Please enter new default directory for source images or RTN.
23
24 set a = $<
25 if ($a != "") then
26 set SRC = $a
27 endif
28
29 echo ""
30 echo Checking for our known set of source images
31 echo ""
32
33 # When MONOCHROME1 is handled by the print routines, add the following :
34 # fuji/FUJI95701 \
35 # fuji/FUJI95706 \
36 # fuji/FUJI95707 \
37 # fuji/FUJI95714 \
38 # kodak/KHIS073006030 \
39 # kodak/KHIS073013420 \
40 # kodak/KHIS080105590 \
41 # kodak/KHIS080107130 \
42
43 set PASS = TRUE
44 foreach i (acuson/ACN000001 \
45 acuson/ACN000004 \
46 acuson/ACN000104 \
47 algotec/ALGO00000 \
48 algotec/ALGO00002 \
49 atl/ATL000001 \
50 atl/ATL000007 \
51 atl/ATL000013 \
52 atl/ATL000015 \
53 ge/1.2.840.113674.1115.261.200 \
54 ge/1.2.840.113674.1118.54.200 \
55 ge/1.2.840.113674.1140.196.200 \
56 ge/1.2.840.113674.1242.214.200 \
57 ge/1.2.840.113674.1335.106.200 \
58 ge/THU9948 \
59 picker/2.16.840.1.113662.2.1.53544936282433.12345.336.16650 \
60 picker/2.16.840.1.113662.4.8796818069641.798806497.93296077602350.10 \
61 picker/2.16.840.1.113662.4.8796818069641.798806497.93296077602350.20 \
62 picker/2.16.840.1.113662.4.8796818069641.798806497.93296077602350.30 \
63 siemens/SMS000005 \
64 siemens/SMS000009 \
65 siemens/SMS000013 \
66 siemens/SMS000018 \
67 siemens/SMS000023 \
68 toshiba/TMS061001)
69 if (!(-e $SRC/$i)) then
70 echo Missing $SRC/$i
71 set PASS = FALSE
72 endif
73 end
74
75 if ($PASS != "TRUE") then
76 echo One or more source directories were not found. Please check your
77 echo directory structure or list of source directories and rerun this script.
78 exit
79 endif
80
81 echo ""
82 echo The default target directory for the print demonstration is
83 echo " " $DST
84 echo You can change this default at this point by entering a new
85 echo directory name. You can use the default by hitting return.
86 echo ""
87 echo Please enter new default directory for target images or RTN.
88
89 set a = $<
90 if ($a != "") then
91 set DST = $a
92 endif
93
94 set PASS = TRUE
95 foreach i (config db images)
96 if (!(-e $DST/$i)) then
97 echo missing $DST/$i
98 set PASS = FALSE
99 endif
100 end
101 if ($PASS != "TRUE") then
102 echo One or more target directories were not found. Please check your
103 echo directory structure or list of source directories and rerun this script.
104 exit
105 endif
106
107 if (-e $DST/db/print.db) then
108 echo It is suspicious that you have an existing print database in
109 echo " " $DST/db/print.db
110 echo Continuing with this script may cause existing print files to be
111 echo deleted. Do you wish to continue "(y/n)?"
112 set a = $<
113 if (($a != "y") && ($a != "Y")) then
114 exit
115 endif
116 endif
117
118 echo The script will now create all of the print files and icon files
119 echo needed for the print demonstration. On a Sparc 10, this takes
120 echo 90-110 minutes.
121 echo Please his RTN when you are ready to proceed.
122 set a = $<
123
124 # When MONOCHROME1 is handled by the print routines, add the following :
125 # fuji/FUJI95701 \
126 # fuji/FUJI95706 \
127 # fuji/FUJI95707 \
128 # fuji/FUJI95714 \
129 # kodak/KHIS073006030 \
130 # kodak/KHIS073013420 \
131 # kodak/KHIS080105590 \
132 # kodak/KHIS080107130 \
133
134 foreach i (acuson/ACN000001 \
135 acuson/ACN000004 \
136 acuson/ACN000104 \
137 algotec/ALGO00000 \
138 algotec/ALGO00002 \
139 atl/ATL000001 \
140 atl/ATL000007 \
141 atl/ATL000013 \
142 atl/ATL000015 \
143 ge/1.2.840.113674.1115.261.200 \
144 ge/1.2.840.113674.1118.54.200 \
145 ge/1.2.840.113674.1140.196.200 \
146 ge/1.2.840.113674.1242.214.200 \
147 ge/1.2.840.113674.1335.106.200 \
148 ge/THU9948 \
149 picker/2.16.840.1.113662.2.1.53544936282433.12345.336.16650 \
150 picker/2.16.840.1.113662.4.8796818069641.798806497.93296077602350.10 \
151 picker/2.16.840.1.113662.4.8796818069641.798806497.93296077602350.20 \
152 picker/2.16.840.1.113662.4.8796818069641.798806497.93296077602350.30 \
153 siemens/SMS000005 \
154 siemens/SMS000009 \
155 siemens/SMS000013 \
156 siemens/SMS000018 \
157 siemens/SMS000023 \
158 toshiba/TMS061001)
159 echo Working on source directory $SRC/$i
160 set file_list = `ls $SRC/$i`
161 icon_script $SRC $DST/images $i $DST/db/print.db $DST/db/icon.index \
162 $DST/db/icon.file $file_list
163 if ($status != 0) then
164 echo icon_script failed
165 exit
166 endif
167 end