impkg- Returns status of the image package
impkg ?-version -commands?
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. It is largely used as a hook for checking the autoloading features.
-version | Returns the version number of the Image package |
-commands | Returns the list of commands added to Tcl by the image package |
The requested information as a Tcl list
Doesn't exist
Work out what else to do with this command
imcreate- Creates a new empty image
imcreate name ?-width n -height n -depth n -type s/l/f -level n?
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 image data can be 16 bit unsigned, 32 bit signed or floating point, default is 16bit unsigned.
The command will not create a new image if an existing image has
the same name.
-width n | Create with width to n pixels, default is 1 |
-height n | Create with height n pixels, default is 1 |
-depth n | Creates with depth n pixels, default is 1 |
-type short/long/float | Use 16 bit unsigned, 32 bit signed or floating point data type, default is short |
-level n | Sets each pixel in the image to that initial value otherwise the initial state of the pixel is not guaranteed |
The name of the image created, or an error string.
Only short data type implemented
Add other data types
Add auto naming feature
imlist- List images
imlist ?-count?
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.
-count | return the number of images in the list or 0 if there are no matching images. |
The requested information as a Tcl list
Wildcard feature not implemented
imdelete- Destroys an image
imdelete 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 name of the image deleted.
Add wildcard
iminclude- Include images from a previous session into system
iminclude name
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.
The name of the image included.
Add wildcard
imremove- Remove images from a session without destroying data
imremove name
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.
The name of the image removed.
Add wildcard
imcopy- Make a copy an image, or part of an image
imcopy name ?-x n -y n -width n -height n -row n -col n?
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.
-x n | X origin of region to copy, default is 0 |
-y n | Y origin of region to copy, default is 0 |
-width n | Width of region to copy |
-height n | Height of region to copy |
-row n | Copy only row n |
-col n | Copy only column n |
What about 3d images
implace- Make a copy an image, or part of an image
implace name ?-x n -y n -width n -height n -row n -col n?
Copies pixel data from one image to another. With no other options this will copy the entire image from the source to the destination.
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 exisiting 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.
The main reason for a separate command is to avoid a confusing number of options and default behaviours to the imcopy command
-x n | X origin of destination, default is origin |
-y n | Y origin of destination, default is origin |
What about 3d images
imlevel- Set all pixels in image to supplied value
imlevel image value
This command sets all the pixels in an image to the same supplied
value. Admittadly 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 initialsed to any value when they are created
with the imcreate command.
imrand- Set all pixels in image to supplied level + random variation
imrand image mean sd
A minimal dark frame simluator, 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_man.htm,v 1.1 1997/03/19 08:29:18 optics Exp $