| imdkern | plot | imdkern |
imdkern -- image display device graphics kernel
imdkern input
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.