This package provides the commands to handle image data, it is
used by almost all of the other packages.
The system supports 1,2 and 3 dimensional images of unlimited size.
The data in the image can be stored in three types.
The system deals with lists of named images, most of the commands
require the name of an image for the command to operate on, and
a list of options to specify the parameters to the command.
impkg | Status information about image package and its commands |
iminfo | Information about image |
imlist | List of images |
imcreate | Creates a new empty image |
imdelete | Destroys and image and recovers all it's resources |
iminclude | Include an image in the current list |
imremove | Remove an image from the current list |
imcopy | Copy a region of an image into another image |
implace | Copy images into single larger image |
imlevel | Set all pixels in an image to a fixed value |
imrand | Set pixels in an image to random values |
This provides information about the status of the image package.
It is similar to the TCL info command but only applies
to the image package. The command supports a number of options.
The commands option lists all the commands added by the
image package, further information about each command can then
be found from the help system. The exists option takes
the name of an image as an argument and returns 1 if the image
exists or 0 otherwise. The version option returns the version
number of the image package in the same way as the info tclversion
command.
This returns a TCL list of the parameters of the image, it's name,
size, statistics, date created etc. Individual values can be selected
by specifying the value as an option otherwise all the information
is returned.
This returns a TCL list of all the image names currently included,
a wildcard can be given to return only the names matching the
wildcard. The count option will return the number of images
in the list or 0 if there are no matching images.
Creates a new empty image. This command is not usually needed
since images are created automatically when needed, but it is
useful for testing scripts. The size of the image in each dimension
of the image can be specified, any dimension not specified defaults
to 1. The level option sets each pixel in the image to
that initial value otherwise the initial state of the pixel is
not guaranteed. The command will not create a new image if an
existing image has the same name.
This is the opposite of the imcreate command, it totally
erases an image from the system. The image object is removed from
the current image list and from memory, all the resources used
by the image are recovered. This command is needed because new
images survive between instances of the system running, images
do not have to be explicitly saved in order to be used again.
The include command adds an existing image to the list of current
images. By default all images in the system are added to the list
when the image package is loaded. This command can be used to
add back images removed by the imremove command. A list
of images or a wildcard can be used to specify the images to be
included.
Removes an existing image from the list of current images. The
removed image isn't actually deleted from the system but will
be ignored by all the image commands until iminclude is
used to include it again. This feature is useful for concentrating
on a small number of images. Note that the imcreate command
will only check the list of current images and so a removed image
can be destroyed by creating a new image with the same name.
Copies pixel data from one image to another. With no other options
this will copy the entire image from the source to the destination.
The destination image will be created if necessary, or resized
to fit the region to be copied, the source image is not changed.
If coordinates and a size are specified only that sub-region will
be copied to the new image, the region will be placed at the origin
of the destination image. The command also supports a row and
column option which copy just the specified 1 dimensional region.
Since this command shrinks the destination image to fit the region
to be copied it cannot be used to build a mosaic of images, to
place several images into a larger image at defined positions
use the implace command.
This extends the imcopy command to allow smaller images to be
placed together in a larger image. It will place the source image
at a specified coordinate in an existing destination image, the
region being copied is trimmed to fit the destination. This can
be used to combine quadrants into whole array images but lacks
the more complicated re-alignment and re-sampling functions needed
to generate large mosaics from sky data.
This command sets all the pixels in an image to the same supplied
value. Admittedly this is not the most advanced command but does
have it's uses when creating dummy images for testing. Note that
new images can be initialised to any value when they are created
with the imcreate command.
A minimal dark frame simulator, this sets each pixel in an image
to a random value with a supplied mean and standard deviation.
Note that the final value is mean + rand(sd) . Again this command
is mostly used for generating test data.
Created from $Id: image.htm,v 1.2 1997/03/19 04:01:04 optics Exp $