Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1488 |
|
Package | general | |
Module | images | |
Tool | image |
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 |
General
This function (short-hand name mhgui) starts the custom GUI
interface for the maskhandler
function. Here is an example of the GUI.
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.
Thus
- im := image('myimage') - g := im.maskhandlergui() # Click Dismiss on GUI - g := im.maskhandlergui() # Get GUI back with some reset
- 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.