Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1488
News FAQ
Search Home


next up previous contents index
Next: regionmanager.intersection - Function Up: regionmanager - Tool Previous: regionmanager.getselectcallback - Function


regionmanager.gui - Function



Package general
Module images
Tool regionmanager


Start the GUI interface


Synopsis
gui(parent, tlead, tpos)


Arguments

parent in Parent of the widget
    Allowed: Tk frame
    Default: F
tlead in Lead frame
    Allowed: Tk frame
    Default: F
tpos in Position of GUI relative to lead
    Allowed: String
    Default: 'sw'


Returns
Bool or fail


Description
This function starts the GUI interface for the regionmanager. You can embed the GUI in a parent frame if desired. For world regions in particular, the GUI interface is better than the command line interface. Popuphelp is available on many of the buttons, labels and list box entries. In general, look for popuphelp on labels of entry boxes rather than the entry boxes themselves.

The tlead, tpos arguments are the same as for the Glish/Tk frame command and control where the GUI goes. By default it goes where it feels like. If you dismiss the GUI and reissue the gui command, it is just remapped, so the arguments are ignored. If you destroy the GUI (under the File button) then the arguments for the gui command are honoured.

Here is an example of how the GUI might look.

Figure 1.4: The main Regionmanager GUI
\begin{figure}
\begin{center}
\epsfig{file=regionmanager0.ps, width=3.6in}\end{center}\end{figure}

The main control panel of the GUI shows three list boxes. To the left is a list of the different types of regions that you can create. In the middle is a list of image tools currently available to Glish (two in this example). To the right is the list of regions that have been made so far (in this example, some pixel, world and compound regions).

Just click on one of the region types in the left hand list box and an additional GUI will appear for that region type. Enter the parameters for the region and press the `create' button of the specific region GUI. The new region will then appear in the right-hand list box of the main control panel. For world regions, you must select an image from the middle list box first, and then click on the region type you wish to create.

Other buttons on the main GUI function as follows.

1. For the `Images' listbox. The `deselect' button deselects all items in the images listbox.

2. For the `Available Regions' listbox. The `Delete' button deletes any selected regions. The `Undelete' button can be used to recover the region last deleted. The `Edit' button lets you edit a selected region. The `Copy' button lets you copy one selected region to a new region. The `Rename' button lets you rename one selected region. The `Clipboard' button is in fact a menu from which you can copy the selected region to the default clipboard tool (dcb) or paste a region from dcb to Glish. For the latter operation, the region name will be automatically chosen.

3. Along the bottom of the GUI we find the `Refresh' button to refresh/update the `Images' and `Available Regions' listboxes with images and regions currently available to Glish. The `Dismiss' button dismisses the GUI but preserves its state. You can recover it but issuing the gui function call again.

The other three buttons are used in the communications with region entry widgets used for example, by the Toolmanager interface. What happens is that you can initiate, from the region entry widget, a connection to the Regionmanager (by selecting the RegionmanagerGUI entry from the spanner menu). Once you have done that, the drm Regionmanager GUI will be displayed and the `Send&dismiss', `Send' and `Break' buttons will be enabled. You then select the desired region in the `Available Regions' listbox. You then send it to the region entry widget by pressing either the `Send&dismiss' or `Send' buttons. When you press the former, the Regionmanager GUI is dismissed and the connection broken. When you press the latter, the Regionmanager GUI remains and the connection persists. If you want to just break the connection, press the `Break' button (these three buttons then disable).

Note that only one region entry widget at a time can be connected to the drm Regionmanager GUI (otherwise you might get a bit confused about which regions are going where).

4. The `File' menu button at the top left of the GUI gives you 5 choices. The first three enable you to save regions to Table (e.g. an image), restore then from a Table and delete regions from a Table, respectively. Each of these starts its own GUI for these actions. These are described in saveregions, restoreregions, and deleteregions, respectively.

Regarding their interaction with the Regionmanager, the following is relevant.

With the `Save' widget, the regions that you have selected in the Regionmanager `Available Regions' listbox are available for saving. Whenever you change the Regionmanager selection, the Save widget updates.

With the `Restore' widget, the regions available for restoring to Glish come from the first selected image in the Regionmanager GUI `Images' listbox (or from the Table you type in to the Restore widget).

With the `Delete' widget, the Table that you are deleting regions from comes from the first selected image in the Regionmanager GUI `Images' listbox (or from the Table you type in to the Restore widget).

The other two items in the `File' menu dismiss the Regionmanager GUI (preserving its state) and destroy the Regionmanager GUI. In both cases the GUI can be recovered by running the gui function of the Regionmanager again.



Example
- drm.gui()
T





next up previous contents index
Next: regionmanager.intersection - Function Up: regionmanager - Tool Previous: regionmanager.getselectcallback - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-08-01