Draws aligned images or outlines on a graphics display DRAWNDF
Depending on the LINES and IMAGE parameters, an outline showing the extent of each image can be plotted, or the pixels of the image plotted resampled into the given coordinate system, or both. Each outline or pixel block shows the extent of the data array of the corresponding image, and is therefore basically rectangular in shape, though it may be distorted if the mapping between pixel and Current coordinates is nonlinear. The origin (minimum X,Y pixel value) of each boundary can be marked and the image labelled with its name and/or index number. Optionally (according to the TRIM parameter), the display may be restricted to the useful extent of the image, enabling overscan regions or bias strips to be ignored.
If the LINES parameter is true, the position of each image’
s data array will be indicated by a (perhaps
distorted) rectangle drawn on the device. If the IMAGE parameter is true, then the image’
s pixels will
be plotted as well as its position. The colour levels in this case are determined by the PERCENTILES
argument applied separately to each plotted frame, and overlapping images will simply be drawn
on top of each other - no averaging or scaling is performed. If the IMAGES parameter
is false, the program does not need to examine the data pixels at all, so it can run much
faster.
The results are only likely to be sensible if the Current coordinate system of all the images is one in which they are all (more or less) aligned. If the Current attached coordinate systems of all do not all have the same Domain (name), a warning will be issued, but plotting will proceed.
DRAWNDF uses the AGI graphics database in a way which is compatible with KAPPA applications; if the CLEAR parameter is set to false (only possible when IMAGE is also false) then it will attempt to align the plotted outlines with suitably registered graphics which are already on the graphics device; in this case outlines or parts of outlines lying outside the existing graphics window remain unplotted. So, for instance, it is easy to overlay the outlines of a set of frames on a mosaic image which has been constructed using those frames, or to see how an undisplayed set of frames would map onto one already displayed, either by a previous invocation of DRAWNDF or by a KAPPA program such as DISPLAY or CONTOUR.
This routine is designed for use on two-dimensional images; if the images presented have more than two dimensions, any higher ones will be ignored.
If you want the outlines to be drawn over the top of an existing DATA picture, for instance one
displayed with KAPPA’
s DISPLAY application, then set CLEAR to false. If possible, alignment will
occur within the Current coordinate system of the image. If this is not possible, an attempt is made in
SKY, PIXEL or GRID domains. If the image cannot be aligned in any suitable domain, then
DRAWNDF will terminate with an error. If CLEAR is set to FALSE, then there must already be a
picture displayed on the graphics device.
The CLEAR parameter is ignored (and the device cleared anyway) if IMAGE is true. [TRUE]
If the TRIM parameter is set true, then only the area defined by these values is drawn. If TRIM is false, this parameter is ignored.
If a global value for this parameter has been set using CCDSETUP then that value will be used. If USESET is true then a value specific to the Set Index of each image will be sought.
"
N"
, "
C"
or "
F"
, for Near to the origin,
Central or Far from the origin. Normally (unless LABUP is true) the text will be written
parallel or antiparallel to the X pixel direction for each image, with one edge anchored
as per the value of LABPOS in such a way that the text sits inside the outline (if it will
fit).
Only the first two characters are significant.
LABPOS normally defaults to "
NN"
, indicating the label written next to the origin, but if LABUP is
set TRUE, then it defaults to "
CC"
. [NN]
"
CC"
. [FALSE] If the logging system has been initialised using CCDSETUP then the value specified there will be
used. Otherwise, the default is "
CCDPACK.LOG"
. [CCDPACK.LOG]
TERMINAL – Send output to the terminal only
LOGFILE – Send output to the logfile only (see the LOGFILE parameter)
BOTH – Send output to both the terminal and the logfile
NEITHER – Produce no output at all
If the logging system has been initialised using CCDSETUP then the value specified there will be
used. Otherwise, the default is "
BOTH"
. [BOTH]
Note that the percentile levels are calculated separately for each of the images in the IN list, so that the brightest pixel in each image will be plotted in the same colour, even though their absolute values may be quite different. [2,98]
’
items; as explained in the ‘Plotting Styles and
Attributes’ section of SUN/95, except that colours may only be specified by number, and not by
name.
Some attributes which it may be useful to set are the following (default values given in square brackets):
width(curves) – the thickness of outlines drawn [1]
colour(curves) – colour of the outlines (if PENROT is true, serves as starting value) [1]
size(strings) – font size of text labels [1]
colour(strings) – colour of text labels [1]
colour(markers) – colour of origin markers [1]
colour – colour of everything plotted (including axes and axis labels) [1]
grid – whether to draw a grid (1=yes, 0=no) [0]
title – title to draw above the plot [coords title]
["
"
]
If a global value for this parameter has been set using CCDSETUP then that value will be used. [FALSE]
’
images, as well as axes showing the common coordinate system in which they
all reside. The plotting area will be made just large enough that all the outlines
fit in. Prior to running this, the Current attached coordinate system of all the
reg-data
images should be one in which they are all aligned. ’
images aligned with whatever is already plotted on the graphics device, for instance the result of a
KAPPA DISPLAY command or of a previous call of DRAWNDF. Parts of the image outlines which fall
outside the existing plot area will not be visible. If this is attempted when there is no existing picture
on the graphics device it will fail with an error. "
one,two,three"
axes labname labnum
penrot "
size(strings)=2,width(curves)=3"
This will draw outlines of the images ‘one’
,
‘two’
and ‘three’
in the current directory with labelled axes, in triple-thick lines and with
double-size text labels which read ‘1: one’
, ‘2: two’
and ‘3: three’
respectively. The colour
of each outline and its associated text label will be different from the others. "
colour=2"
nolabel nolabnum ’
will be
outlined in colour 2, with no text labels or indication of the origin. "
obs-[abc]"
image lines labup labopaque=false Resampling schemes: When the IMAGE parameter is true and image pixels are plotted, the image data has to be resampled into the Current coordinate system prior to being displayed on the graphics device. DRAWNDF currently does this using a nearest-neighbour resampling scheme if the display pixels are of comparable size or larger than the image pixels, and a block averaging scheme if they are much smaller (less than one third the size). Though slower, this latter scheme has the advantage of averaging out noisy data.
Pixel indices: The EXTENT values supplied should be given as pixel index values. These usually start at (1,1) for the pixel at the lower left hand corner of the data-array component (this may not be true if the images have been sectioned, in which case the lower left hand pixel will have pixel indices equal to the data component origin values). Pixel indices are different from pixel coordinates in that they are non-continuous, i.e. can only have integer values, and start at 1,1 not 0,0. To change from pixel coordinates add 0.5 and round to the nearest integer.
Display: The IMAGE display mode is not particularly sophisticated. If you wish to view a
single image in its pixel coordinate system, you may find KAPPA’
s DISPLAY program
more versatile.
"
current"
value is the value assigned on the last run of the application. If the
application has not been run then the "
intrinsic"
defaults, as shown in the parameter help,
apply.
Retaining parameter values has the advantage of allowing you to define the default behaviour of the application. The intrinsic default behaviour of the application may be restored by using the RESET keyword on the command line.
Certain parameters (LOGTO, LOGFILE, USESET and EXTENT) have global values. These global values will always take precedence, except when an assignment is made on the command line, or in the case of EXTENT, if USEEXT is true. If USESET is true, a global value for EXTENT corresponding to the Set Index of each image will be sought. Global values may be set and reset using the CCDSETUP and CCDCLEAR commands.
The DEVICE parameter also has a global association. This is not controlled by the usual CCDPACK mechanisms, instead it works in co-operation with KAPPA (SUN/95) image display/control routines.
If the parameter USEEXT is true then the EXTENT parameter will be sought first from the input NDF extensions, and only got from its global or command-line value if it is not present there.
’
s communication with the AGI database is compatible with most
of KAPPA’
s behaviour, but is slightly less capable; in particular it will fail to align with pictures
whose alignment has been stored using TRANSFORM structures instead of MORE.AST extensions.
This affects only older applications.