1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
|
Doug,
I have finished the initial IMAGES package reorganization. The following
notes should give a pretty good sumary of what I have done to date.
Lindsey
IMAGES PACKAGE REORGANIZATION
I. GENERAL COMMENTS
The first version of the revised IMAGES package is now available for review.
At present the revised package is called IMAGESX annd can be loaded and
executed on tucana by creating the following environment and package
definitions.
set imagesx = /d1/davis/imagesx/
task imagesx.pkg = imagesx$imagesx.cl
IMAGESX is not an external package so the help database has not been built.
However all the .hd, .men, and .hlp files should have proper entries and
be in their proper places.
The old TV subpackage is not yet installed in IMAGESX as I did not alter
its organization or appearance to the user.
II. PACKAGE STRUCTURE AND SUBPACKAGE NAMES
IMAGESX contains 83 (29 are new to the images package) tasks divided into
the following 8 logical subpackages.
IMALGEBRA - Image expression evaluation package # e.g. imarith, imexpr
IMCOORDS - Image coordinates package # e.g. ccmap, ccsetwcs
IMFIT - Image fitting package # e.g. fit1d, imsurfit
IMFILTER - Image filtering package # e.g. boxcar, gauss
IMGEOTRAN - Image geometric transformation package # e.g. rotate, magnify
IMMATCH - Image matching and combining package # e.g. xregister, imcombine
IMTV - Image display utilities package # e.g. display, imexamine
IMUTIL - Image utilities package # e.g. hedit, imcopy
The subpackage names have been prefixed with IM for consistency and to
minimize possible name conflicts with tasks in other packages (e.g. IMMATCH
and MATCH, IMGEOTRAN and GEOTRAN, IMCOORDS and COORDS) and for consistency
with other package names (IMUTIL and ASTUTIL). They were also chosen to avoid
conflict with the names of existing tasks. These names should be reviewed
carefully as we want to live with them for awhile.
Using the IM prefix implies that the existing images subpackage TV should be
renamed to IMTV in the new scheme.
The only subpackage name conflict I am aware of is that of IMMATCH with the
CTIO.IMMATCH task which is a 1D version of the current XREGISTER task.
III. PACKAGE DIRECTORY STRUCTURE
The main IMAGESX directory stucture currently looks like the following
drwxr-xr-x 4 davis 512 Jan 22 10:39 imalgebra
drwxr-xr-x 4 davis 512 Jan 20 15:18 imcoords
drwxr-xr-x 4 davis 512 Jan 13 14:30 imfilter
drwxr-xr-x 4 davis 512 Jan 13 09:36 imfit
drwxr-xr-x 4 davis 512 Jan 23 13:53 imgeotran
drwxr-xr-x 4 davis 1024 Jan 23 14:06 immatch
drwxr-xr-x 2 davis 512 Jan 23 14:29 imtv
drwxr-xr-x 4 davis 1024 Jan 23 14:06 imutil
drwxr-xr-x 2 davis 1024 Jan 20 12:22 lib
The subdirectory names mimic the names of the subpackages with the exception
of LIB which contains source that is either used by tasks in more than one
subpackage or is of sufficiently general interest that it might make an XTOOLS
package or routine at some point.
IV. PACKAGE EXECUTABLE
All the tasks except the IMTV tasks (which are not hooked up yet) are
currently in the same executable as is the case for the current IMAGES
package.
V. REORGANIZATION RELATED CHANGES TO EXISTING IMAGES PACKAGE TASKS
The undocumented tasks in the IMDEBUG package have been removed. These
are CUBE, DUMP, GSUBRAS, MAXMIN, MKIMAGE, and MKTEST. All of these tasks except
DUMP have been superseded by tasks in the IMAGES or ARTDATA packages.
DUMP is occasionally useful for diagnosing problems with pathological image
headers and could be documented and moved to PROTO.
The script task REGISTER (a simple script task on top of GEOTRAN) has
been renamed GREGISTER to indicate is close ties to GEOMAP/GEOTRAN and
to make it look less generic when listed with other REGISTRATION tasks like
XREGISTER (x-correlation registration) and SREGISTER (celestial coordinate
wcs registration).
VI. SUBPACKAGES
The tasks in each subpackage are described below. New tasks are starred and
their origins described in the notes section.
In some cases a task appears in the listing for more than one subpackage. For
example WCSCOPY appears in IMMATCH but is also included in IMCOORDS because
it is part of the image matching process but can also be a useful utility.
In all cases where this occurs there is only one version of the parameter file.
VI.I IMALGEBRA
This subpackage contains various image arithmetic, function, and expression
evaluation routines. This package should eventually include the image
calculator is also a good place to put various other simple image operator
routines as they are written.
images.imalgebra:
imarith - Simple image arithmetic
imdivide - Image division with zero checking and rescaling
imexpr - Evaluate a general image expression
*imfunction - Apply a single argument function to a list of images
imsum - Compute the sum, average, or median of a set of images
Notes:
[1] IMFUNCTION is the PROTO package task of the same name. I have included it
here because provides a very simple interface for doing things like computing
the square or square root of an image amd hence complements the IMEXPR task
as IMARITH does.
[2] I chose the subpackage name IMALGEBRA instead of IMCALC to avoid
conflicts with the existing IMCALC tasks (in XRAY and STSDAS) and to leave
the name open for the eventual definitive version of the IMCALC task.
VI.II IMCOORDS
This subpackage contains tasks for setting, editing, and transforming image
coordinate systems, and for transforming coordinate lists from one
coordinate system to another using the image coordinate system. All these
tasks are new and either derive from the IMMATCH or PROTO packages. I thought
IMCOORDS was a reasonable name for the subpackage but IMWCS is another
possibility.
images.imcoords:
* ccmap - Compute image plate solutions using matched coordinate lists
* ccsetwcs - Create an image celestial wcs from the ccmap plate solution
* cctran - Transform coordinate lists using the ccmap plate solution
* ccxymatch - Match celestial and pixel coordinate lists
* imcctran - Transform image header from one celestial wcs to another
* skyctran - Transform coordinates from one celestial wcs to another
* wcscopy - Replace the wcs of one image with that of another
* wcsctran - Transform coordinates from one iraf image wcs to another
* wcsedit - Edit an image wcs parameter
* wcsreset - Reset the specified image wcs
Notes:
[1]. WCSRESET and WCSEDIT are the PROTO package tasks of the same name. They
are very general tasks and work on images of any size and any supported wcs
type. WCSRESET in particular is very useful for removing a world or physical
wcs.
[2]. The remaining tasks were all part of the current IMMATCH package.
[3]. WCSCOPY also appears in immatch package
VI.III IMFILTER
This subpackage contains the image filtering tasks. I expect this package
could grow in the future. All of the tasks are in the current IMAGES
package although some like the ring median filters will be new with 2.11.
images.imfilter:
boxcar - Boxcar smooth a list of 1 or 2-D images
convolve - Convolve a list of 1 or 2-D images with a rectangular filter
fmedian - Quantize and box median filter a list of 1D or 2D images
fmode - Quantize and box modal filter a list of 1D or 2D images
frmedian - Quantize and ring median filter a list of 1D or 2D images
frmode - Quantize and ring modal filter a list of 1D or 2D images
gauss - Convolve a list of 1 or 2-D images with an elliptical Gaussian
gradient - Convolve a list of 1 or 2-D images with a gradient operator
laplace - Laplacian filter a list of 1 or 2-D images
median - Median box filter a list of 1D or 2D images
mode - Modal box filter a list of 1D or 2D images
rmedian - Ring median filter a list of 1D or 2D images
rmode - Ring modal filter a list of 1D or 2D images
VI.IV IMFIT
This subpackage contains the current line and surface fitting tasks. This is
a small package but one which could grow substantially in the future. Examples
of new tasks are a more sophisticated background fitting and surface fitting
tasks, etc.
images.imfit:
fit1d - Fit a function to image lines or columns
imsurfit - Fit a surface to a 2-D image
lineclean - Replace deviant pixels in image lines
VI.V IMGEOTRAN
This subpackage contains a set of geometric tranformation operatores which
move pixel and may alter their values via image interpolation. All these
tasks update the wcs information as well.
imgeotran:
blkavg - Block average or sum a list of N-D images
blkrep - Block replicate a list of N-D images
geotran - Geometrically transform a list of 1-D or 2-D images
imlintran - Linearly transform a list of 2-D images
imshift - Shift a list of 1-D or 2-D images
imtranspose - Transpose a list of 2-D images
* im3dtran - Transpose a list of 3-D images
magnify - Magnify a list of 1-D or 2-D images
rotate - Rotate and shift a list of 2-D images
shiftlines - Shift the lines of a list of N-D images
Notes:
[1]. GEOTRAN also appears in the IMMATCH package.
[2]. IM3DTRAN comes from Steve Rook's VOL package. I added mwcs support.
VI.VI IMMATCH
This subpackage contains tasks for registering or combining images spatially
and for match their psfs and intensity scales.
images.immatch:
geomap - Compute geometric transforms using matched coordinate lists
geotran - Transform 1-D or 2-D images using the [geo|sky|wcs]map transforms
* geoxytran - Transform coordinate lists using the geomap transforms
gregister - Register 1-D or 2-D images using the geomap transforms
* imalign - Align and register 2-D images using a reference x-y list
*imcentroid - Compute and print relative shifts for a list of 2-D images
imcombine - Combine images pixel-by-pixel using various algorithms
* linmatch - Match the linear intensity scales of 1-D or 2-D images
* psfmatch - Match the point-spread functions of 1-D or 2-D images
* skymap - Compute geometric transforms using the image celestial wcs
*skyxymatch - Generate matched x-y lists using the image celestial wcs
* sregister - Register 1-D or 2-D images using the image celestial wcs
* wcscopy - Copy the wcs from one image to another
* wcsmap - Compute geometric transforms using the image wcs
*wcsxymatch - Generate matched x-y lists using the image wcs
* wregister - Register 1-D or 2-D images using the image wcs
* xregister - Register 1-D or 2-D images using x-correlation techniques
* xyxymatch - Match pixel coordinate lists
Notes:
[1]. Most of the new tasks come from the IMMATCH package. IMCENTROID and
IMALIGN are the PROTO package image registration tasks of the same name
which I have modified slightly and included in the IMMATCH package as
they offer a useful alternative to XREGISTER.
[2]. The registration tasks (GREGISTER, SREGISTER, and WREGISTER) are
script tasks which call the GEOTRAN task to compute the output image.
They set up the transformation in different ways depending on whether
a matched pixel list, a celestial coordinate system image wcs, or a general
image wcs is to be used. SREGISTER in particular is capable of registering
images which have coordinate systems at different epochs (e.g. 1950 and 2000)
or in different systems (e.g. equatorial and galactic).
[3]. WCSCOPY also appears in the IMCOORDS package.
VI.VII IMTV
This subpackage contains tasks which load and/or interact with the image
display. The package is unchanged except for being called IMTV in the new
scheme.
images.imtv
display - Load an image or image section into the display
iis - IIS image display control package
imedit - Examine and edit pixels in images
imexamine - Examine images using image display, graphics, and text
tvmark - Mark objects on the image display
wcslab - Overlay a displayed image with a world coordinat
VI.VIII IMUTIL
This subpackage contains the basic images utilities package.
images.imutil
chpixtype - Change the pixel type of a list of images
hedit - Header editor
hselect - Select a subset of images satisfying a boolean expression
imcopy - Copy an image
imdelete - Delete a list of images
imgets - Return the value of an image header parameter as a string
imheader - Print an image header
imhistogram - Compute and plot or print an image histogram
* imjoin - Join images along a given dimension
imrename - Rename one or more images
* imreplace - Replace a range of pixel values with a constant
imslice - Slice images into images of lower dimension
imstack - Stack images into a single image of higher dimension
* imtile - Tile same sized 2D images into a 2D mosaic
imstatistics - Compute and print statistics for a list of images
listpixels - Convert an image section into a list of pixels
minmax - Compute the minimum and maximum pixel values in an image
sections - Expand an image template on the standard output
Notes:
[1]. IMJOIN comes from Steve Rooke's VOL package. It joins images of the
same dimension efficiently and complements the IMSTACK task. The wcs of
the resulting image is the wcs of the first image.
[2]. IMREPLACE is the proto package task of the same name. It is a simple
general purpose task that is very useful.
[3]. IMTILE is the old IRMOSAIC task with the database code removed making
it a simple useful 2D image mosaicing task. Often used for combining
before and after pictures of the same field or a time sequence of small images.
VII. TASK NAME CONFLICTS WITH EXTERNAL PACKAGES
The only task name conflict that I am aware concerns the SKYMAP task. There
is a SKYMAP task in STSDAS.GRAPHICS.STPLOT which basically creates a sky
chart for the GSC. Since I would really like to maintain the use
of MAP for my transformation computing tasks (e.g. GEOMAP), I wonder
whether STSDAS would mind renaming this task to SKYCHART... I ran into the name
conflict when I had IMMATCH and GASP loaded at the same time, as GASP uses
the STSDAS version of SKYMAP in some scripts.
VIII. WORK STILL TO BE DONE
I still need to review and if possible implement some changes to the
CCMAP and GEOTRAN tasks requested by Frank. These are mosaic support
related changes. (COMPLETED 8/2/97)
When and if the new wcs function drivers are installed I will need
to release the contraints I currently have on the CCXYMATC, CCMAP, CCSETWCS,
IMCTRAN, CCTRAN, etc tasks ability to handle various sky projections. At
present only tan, sin, and arc are fully supported. In general
this involves changing parameter file constraints and documentation.
|