Go up one levelGo to Previous Go to Next

Tk Image Extension rtdimage

At the heart of the RTD software is a Tk image type called rtdimage that was developed as a C++ class hierarchy. Tk has a documented method of adding new image types and the advantage of using it as opposed to developing a new Tk widget is that you can put a Tk image in a canvas window and use all of the canvas graphics functionality to draw over the image. This can be used to display labels and markers on the image or for more complicated star maps overlaying the image.

The rtdimage extension was developed as a C++ class hierarchy and library, which is described in more detail in later sections of this manual. There are classes for implementing Tcl commands, images and widgets, classes for managing the image transformations and display, the colormap and communication with the real-time image server for displaying images from a CCD camera. The functionality of all these C++ classes is available at the Tcl/Tk level as rtdimage subcommands and via a remote control interface. The following subcommands are currently implemented:

rtdimage Subcommand

Description

alloccolors

Allocate or free colors in the colormap.

autocut

Set the cut levels automatically using median filtering or other algorithm.

bitpix

Return data type (BITPIX field) of the FITS image.

camera

Start, stop, pause or continue a CCD camera real-time display.

clear

Clear or blank out the display.

cmap

Load or manipulate a (MIDAS) colormap.

colorramp

Generate an image to use for the colormap display (color bar or ramp).

colorscale

Apply a color scaling algorithm, such as linear or logarithmic scaling to the image.

configure

Set or query configuration options.

convert

Convert X,Y between different coordinate system types.

cut

Set the cut levels directly.

dispheight

Return display height of image (after transformations).

dispwidth

Return display width of image (after transformations).

dump

Dump or save the image as a FITS file.

fits

Access FITS image header information.

flip

Flip the image in the X or Y directions or both.

frameid

return the frame Id (used for rapid frames and rtdServer communication).

get

Return X,Y coordinates and pixel value(s) for a screen position.

graphdist

Plot a graph of the pixel value distribution.

height

Return height of image (before transformations).

isclear

Return true if the image is cleared (no image loaded).

itt

Load or manipulate a (MIDAS) intensity transfer table or ITT.

max

Return maximum image pixel value.

mband

Draw a measure band on the canvas to display the world coordinate distance.

min

Return minimum image pixel value.

mmap

Access the mmap memory in which the FITS image data and header are stored.

object

Return the astronomical object name, if known, for the viewed object.

pan

Support for a panning window.

perftest

Toggle interactive performance testing on or off.

pixtab

Support for displaying a table of image pixel values as the mouse moves.

preview

When a camera is running, stop it and make a local copy of the image.

radecbox

Returns a list of 4 values {ra0 dec0 ra1 dec1} that form an ra,dec box with the given center point and radius.

remote

Start remote control onterface.

rotate

Rotate the image by swapping X and Y coordinates.

scale

Magnify or shrink the image by integer factors.

shm

SysV shared memory access to image header and data.

spectrum

Plot a graph of pixel values along a line in the image.

statistics

Calculate statistics on the section of the image being displayed.

type

Return the type of the raw image data (short, int, float, ...)

update

Update the image.

userfreq

Set the maximum real-time update frequency.

view

Make a view of an image, a second image displaying the same image, possibly at a different magnification and offset.

warp

Warp (move) the mouse pointer in the image.

wcscenter

Return the center of the image in world coordinates.

wcsdist

Return the world coordinate distance between 2 screen pixel points.

wcsequinox

Return the world coordinates equinox of the image.

wcsheight

Return the height of the image in arcmin.

wcsradius

Return the radius (diagonal to center) in arcmin.

wcsset

Set basic world coordinates information.

wcsshift

Shift the world coordinates center of the image.

wcswidth

Return the widthof the image in arcmin.

width

Return width of image (before transformations).

zoom

Support for a zoom window.

zoomview

Support for an alternate implementation of the zoom window using a view of the raw image (now the default)

In addition, the following configuration options are supported for the rtdimage command:

rtdimage option

Description

-displaymode

Sets display mode to 0 or 1 (default 1), see reference manual for details.

-file

Sets (FITS) image file to load and display.

-fitheight

Shrink to fit image in window of this height.

-fitwidth

Shrink to fit image in window of this width.

-newimagecmd

Sets Tcl command to be evaluated whenever a new image is displayed.

-shm_header

If true, put the image (FITS) header in shared memory for access via the remote control interface.

-shm_data

If true, put the image (FITS) data in shared memory for access via the remote
control interface.

-subsample

Use subsampling when shrinking images (rather than max value).

-usexsync

Flag: if true, try to use X synchronisation extension of displaying images.

-usexshm

Flag: if true, try to use X shared memory for displaying images.

-verbose

Flag: if true, print diagnostic messages at run time.

-name

Set the name of the image (makes debugging easier)

-min_colors

Set the minimum number of colors to allocate before using a private colormap.

-max_colors

Set the maximum number of colors to allocate.

See rtdimage(n) for more details.


Go up one levelGo to Previous Go to Next

Please send questions or comments to abrighto@eso.org.
Copyright © 1998 ESO - European Southern Observatory