Selecting a rectangular region.
The rectangular selection region, or the "image rectangle",
is used throughout Lispix to crop images and data cubes, and to select the
area for showing image data. The rectangle can be set with the mouse
by dragging (use Draw Rectangle below), or with the keyboard,
using one of the Select menu items.
- Draw rectangle - select a rectangular area of pixels by dragging
the mouse from one corner of the rectangle to the other. (New
- 3/05 - rectangle confined within image boundary.)
- Adjust rectangle (new 12/00) - Turns the new drag feature back on.
The drag feature is turned off by some of the tools that offer their
own drag functions.
- Click single pixel - Select a single pixel by clicking on it.
- Select ALL - Select entire image, whether it is visible in the window
- Select all in window - Select all of image visible in window.
- force to square - Moves lower right corner of rectangle so that
it becomes a square with sides equal to the smaller of the rectangle
height or width.
- Set by typing - Set rectangle by typing in coordinates of diagonal
corners, or center coordinates and radius.
- Clear selection - Clears the image rectangle. Clears the :mlx parameter
:image-rectangle by making it nil. Many operations
will work on the whole image if the rectangle parameter is nil.
Also stops drawing the rectangle on all open images.
- Crop image to rectangle - Makes new image of what is inside the
rectangle, copying it to a new window and rescaling. Use shift
key for all images.
- Set Rectangle Color - The rectangle will be drawn in the current
color of the Color menu.
- Show Rectangle - Draws rectangle on the front window - usually some
window other than on which the rectangle was selected.
- Hide Rectangle - Rectangle is no longer shown on front image (shift
key for all images). Does NOT clear the selection - the coordinates
remain in the image-rectangle parameter.
- Show Rectangle Info - Shows rectangle area, size and coordinates
in a dialog.
- image rect overlap - Prints 'and' and 'or' of selected image dimensions.
Assuming the upper left corners of all images to be alligned, gives
lower right corner coordinates of image that would be contained in
all the images, and the lower right corner of image that would contain
all the images.
- mask from rectangle - Uses current image rectangle. Makes a mask
image the size of the front image with the area designated by the
:image-rectangle as white, everything else black. Use Draw
rectangle to set the rectangle.
- Mask from parallelogram - Now incorporated in Make Mask.
- Uses a parallelogram, which you draw:
- Draw a parallelogram on an image window. (Works only on
the front image window.)
(1) Draw a line. (this is first, fixed side of parallelogram.)
(2) Draw another line out from the first line. (This will draw the
other three sides of the parallelogram.)
- Will make a mask image the size of the image that is all black,
except for the parallelogram, which will be white.
- Useful for making masks for '2&3 variable -> scatter plots
- Help - masks - Shows documentation
page for masks.
New 12/04: After drawing the rectangle,
you can move it by clicking anywhere within the rectangle and dragging.
If at a later time the drag feature does not work, it can be turned on again
using Select / Adjust rectangle. So far, adjustment
consists of translation - you cannot yet change the size of the rectangle
by dragging one of its sides or corners.
The image rectangle (shown below in red) is a global parameter,
that is it can be set using any image, and used on any other image.
It corresponds to pixels, i.e. it zooms on the screen along with the image.
is done by setting the image rectangle: Select / Rectangle / Draw
(etc.) and then using Select / Rectangle / Crop Image to rectangle,
which makes a new image that is the size of the rectangle.
To make images
of a specific size, set the rectangle with one of the Select / Rectangle
menus. Use Size! button to move
the image into view if the offset (inherited
from the parent window) has moved it off the
can also be set using the circle in the Circle
Image rectangle in red.
You can also cut and paste the information from the dialog.