Name

impkg- Returns status of the image package

Summary

impkg ?-version -commands?

Description

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.

Options

-versionReturns the version number of the Image package
-commandsReturns the list of commands added to Tcl by the image package

Returns

The requested information as a Tcl list

Bugs

Doesn't exist

Future

Work out what else to do with this command


Name

imcreate- Creates a new empty image

Summary

imcreate name ?-width n -height n -depth n -type s/l/f -level n?

Description

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.

Options

-width nCreate with width to n pixels, default is 1
-height nCreate with height n pixels, default is 1
-depth nCreates with depth n pixels, default is 1
-type short/long/floatUse 16 bit unsigned, 32 bit signed or floating point data type, default is short
-level nSets each pixel in the image to that initial value otherwise the initial state of the pixel is not guaranteed

Returns

The name of the image created, or an error string.

Bugs

Only short data type implemented

Future

Add other data types

Add auto naming feature


Name

imlist- List images

Summary

imlist ?-count?

Description

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.

Options

-countreturn the number of images in the list or 0 if there are no matching images.

Returns

The requested information as a Tcl list

Bugs

Wildcard feature not implemented

Future


Name

imdelete- Destroys an image

Summary

imdelete name

Description

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.

Options

Returns

The name of the image deleted.

Bugs

Future

Add wildcard


Name

iminclude- Include images from a previous session into system

Summary

iminclude name

Description

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.

Options

Returns

The name of the image included.

Bugs

Future

Add wildcard


Name

imremove- Remove images from a session without destroying data

Summary

imremove name

Description

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.

Options

Returns

The name of the image removed.

Bugs

Future

Add wildcard


Name

imcopy- Make a copy an image, or part of an image

Summary

imcopy name ?-x n -y n -width n -height n -row n -col n?

Description

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.

Options

-x nX origin of region to copy, default is 0
-y nY origin of region to copy, default is 0
-width nWidth of region to copy
-height nHeight of region to copy
-row nCopy only row n
-col nCopy only column n

Returns

Bugs

Future

What about 3d images


Name

implace- Make a copy an image, or part of an image

Summary

implace name ?-x n -y n -width n -height n -row n -col n?

Description

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

Options

-x nX origin of destination, default is origin
-y nY origin of destination, default is origin

Returns

Bugs

Future

What about 3d images


Name

imlevel- Set all pixels in image to supplied value

Summary

imlevel image value

Description

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.

Options

Returns

Bugs

Future


Name

imrand- Set all pixels in image to supplied level + random variation

Summary

imrand image mean sd

Description

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.

Options

Returns

Bugs

Future



Created from $Id: image_man.htm,v 1.1 1997/03/19 08:29:18 optics Exp $