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


next up previous contents index
Next: image.miscinfo - Function Up: image - Tool Previous: image.maskhandler - Function


image.maskhandlergui - Function



Package general
Module images
Tool image


Handle masks using a GUI interface


Synopsis
maskhandlergui(parent, widgetset)


Arguments

parent in Parent frame to embed GUI in
    Allowed: GlishTk agent
    Default: Create stand alone
widgetset in The widgetset to use for the GUI
    Allowed: A widgetserver tool
    Default: dws


Returns
Agent or fail



Description


General This function (short-hand name mhgui) starts the custom GUI interface for the maskhandler function. Here is an example of the GUI.

Figure 1.1: The maskhandler GUI
\begin{figure}
\begin{center}
\epsfig{file=imagemaskhandlergui.ps, width=4.5in}\end{center}\end{figure}

The left-hand list box shows you the pixel masks currently available in the image. Underneath the list box the default pixel mask, if any, is listed. You have buttons under the left-hand list box to apply the desired operation. The sequence is to select a pixel mask or pixel masks from the list box, and then click the desired button. Popuphelp is on each button to tell you what they do.

The right-hand list box is used to list the pixel masks from some other image. You enter the image file name with the file entry widget and then enter carriage-return. You can copy masks from that image file to the current image.

If you don't provide a parent frame (the parent argument), the GUI is made in a standalone mode. This means it creates go, reset and dismiss buttons. If you provide the parent frame, you must also provide these buttons and act on them.


Recovering the GUI

When you run this function, it returns an agent which is actually a reference to the underlying GUI. In addition, the GUI is left on the screen. You can explicitly dismiss it by pressing the Dismiss button or selecting Dismiss from the File menu. To recover the GUI you can do one of two things.

1.
Run the command maskhandlergui again. This will return another reference of the GUI to you. However, it will reset some parts of the GUI because it is possible that the image changed since you last ran this function (the pixel masks might have changed, it might even be a different image file attached to this tool).

Thus

- im := image('myimage')
- g := im.maskhandlergui()             # Click Dismiss on GUI
- g := im.maskhandlergui()             # Get GUI back with some reset

2.
Apply the gui function to the reference returned when you ran the maskhandlergui function. This simply recovers the GUI with no resetting. If the image has changed, this will not reflect it.

- im := image('myimage')
- g := im.maskhandlergui()             # Click Dismiss on GUI
- g.gui()                              # Get GUI back with no change

If you destroy the GUI (by selecting Done from the File menu) then you must run the momentsgui function again to regenerate it.





next up previous contents index
Next: image.miscinfo - Function Up: image - Tool Previous: image.maskhandler - 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