imdkern -- image display device graphics kernel
- The list of input metacode files.
- device = "stdimage"
- The output device.
- generic = no
- The remaining parameters are ignored when generic = yes (as when the kernel is called automatically by the system during plotting).
- frame = 0
- The display frame to be drawn into. If the value given is less than or equal to zero, the plot is drawn into the frame currently being displayed.
- color = 205
- The pixel value to be used for graphics. The value required to generate a given color is device dependent. For IMTOOL and compatible display servers (such as SAOIMAGE) black=202, white=203, red=204, green=205, blue=206, yellow=207, and so on through 217. (The tvmark help page contains a full listing of the available colors).
- debug = no
- If debug = yes, the graphics instructions are decoded and printed during processing.
- verbose = no
- If verbose = yes, the elements of polylines, cell arrays, etc. will be printed in debug mode.
- gkiunits = no
- By default, coordinates are printed in NDC rather than GKI units.
The imdkern graphics kernel is used to draw graphics into the image display. To overlay a plot on a displayed image, one first displays the image, then runs imdkern to overlay the graphics on the displayed image. imdkern always overlays a plot on whatever is currently in the display frame buffer. To erase the graphics drawn by imdkern , one must redisplay the frame using display or a similar program, or erase the frame entirely using tv.erase .
Like all IRAF graphics kernels, imdkern may be called either explicitly as a task, to plot a graphics metacode file, or implicitly when the output of a graphics task is directed to a device which uses the IMD kernel. The standard IRAF graphcap file defines the following logical IMD graphics devices:
imd|imdkern same as imdg imdw output to stdimage, frame=0, color=white imdr output to stdimage, frame=0, color=red imdg output to stdimage, frame=0, color=green imdb output to stdimage, frame=0, color=blue imdy output to stdimage, frame=0, color=yellow
As noted earlier, frame=0 causes the graph to be plotted in the currently displayed image display frame.
1. Capture the output of the prow task in a metacode file and plot in image display frame 2.
cl> prow dev$pix 101 >G mc cl> imdkern mc frame=2
2. Display dev$pix in image display frame 1 and overlay a contour plot, drawing the contour plot overlaid on the image in green.
cl> display dev$pix 1 cl> contour dev$pix \ >>> xres=256 yres=256 perim- fill+ label- ceil=500 dev=imdg
Note that a higher than normal resolution contour plot is generated to avoid the contour placement errors that occur when a large block averaging factor is used to generate the contour map (this can make contours drawn around objects such as stars appear to not be centered on the object).
The IMD interface, used by this task to draw the graphics, requires that the display frame buffer be read and edited in the client address space, hence drawing is slow compared to having the display server draw the graphics. This effect is especially noticeable when the display is accessed remotely over the network. Also, because the graph is drawn in the client (i.e., in imdkern ) the GIO fonts must be used for character drawing, so characters will not be as well formed as when display server character generation is used.