xregion

[ XITE Reference Manual | XITE home ]

Contents


Name

xregion - interactively draw regions in an XITE overlay image

Syntax

xregion [<option>...] <image-filename> [<maskimage>]

Description

xregion is a tool for drawing or editing overlay images. On the display, the overlays are drawn with an overlay color palette. Each color may represent a class in a classified image. xregion has an interface to regionAnalyse(1) and statistics(1) which makes it very powerful.

The regions can be stored as masks in an output file, with background = 0 and region-pixels equal to a user specified value (1 - 254 ), default value = 1. Regions must be filled with the same classnumber as they are drawn with.

Options

xregion accepts all of the standard X Toolkit command line options (see X(1)) as well as the XITE ximage(3) toolkit command line options.

Actions

See Image(3) and ImageOverlay(3) for descriptions of menus, key bindings, colortables, zooming and panning.

xregion has a few additional translations defined for editing. These translations invoke the notify action function defined by the Image(3) widget. This action function in turn calls the functions on the XtNcallback list. xregion adds the callback function which performs the actual work.

The additional translations are:

<Btn1Down>
Draw with the present "class" color.

<Btn2Down>
Fill region with the present "class" color.

<Btn3Down>
Clear region.

Draw pushbuttons

Prev
Previous image band.

Next
Next image band.

Clear
Remove all regions (clear all overlays).

Read mask
Read a file of regions (an overlay image).

Save mask
Save the regions (an overlay image).

Save gray
Save the original image where regions are overlapping, set pixels to 0 otherwise.

Set class
Set region number for drawing (new draw color).

Close path

Fill regions
Fill all regions (all holes). This command will remove small areas of background pixels.

Checkpoint
Save the current regions (overlays). Go back to this state by pressing the Undo button. Checkpoint is done automatically before each fill and delete operation performed with the mouse button translations described in the Actions section above.

Undo
Go back to the last checkpoint state.

Graphics
Toggle graphic overlay on/off.

Region analyse
Start the program regionAnalyse on the current regions. Set options with the Parameters pushbuttons. See the section below and regionAnalyse(1).

This program will create a new window. To kill the window or save the content of the window, choose from the menu you get by pressing Shift+<Btn2> in the text window.

Statistics
Invoke the program statistics(1). Set options with the Parameters pushbuttons. See the section below.

Quit
Exit the program.

Parameter pushbuttons

These pushbuttons set options for regionAnalyse and/or statistics.

Resources

In order to specify resources, it is useful to know the hierarchy of the widgets which compose xregion. In the notation below, indentation indicates hierarchical structure.

The following hierarchy is constructed when the default resources/options for widget layout is used. The widgets of class XfwfButton and XfwfToggle can be replaced by class Command and Toggle (from the Athena widget set) by using the ximage(3) option -widgetset or corresponding application resource.

xregion (class XRegion)

 imageShell         (class TopLevelShell)
   imageForm        (class ImageForm)
     image          (class ImageOverlay)
     menubar        (class XfwfMenuBar)
       colors       (class XfwfPullDown)
       overlays     (class XfwfPullDown)
       tools        (class XfwfPullDown)
       options      (class XfwfPullDown)
 xregion control panel (class TopLevelShell)
   topContainer     (class Form)
     Draw commands  (class Label)
     Prev           (class XfwfButton)
     Next           (class XfwfButton)
     Clear          (class XfwfButton)
     Read mask      (class XfwfButton)
     Save mask      (class XfwfButton)
     Save gray      (class XfwfButton)
     Set class      (class XfwfButton)
     Close path     (class XfwfButton)
     Fill regions   (class XfwfButton)
     Checkpoint     (class XfwfButton)
     Undo           (class XfwfButton)
     Graphics       (class XfwfToggle)
     Parameters     (class Label)
     Behaviour      (class Label)
     Header         (class XfwfToggle)
     Nc             (class XfwfToggle)
     Sort           (class XfwfToggle)
     Split          (class XfwfToggle)
     Overlay properties (class Label)
     Objnr          (class XfwfToggle)
     Regnr          (class XfwfToggle)
     Area           (class XfwfToggle)
     Perimeter      (class XfwfToggle)
     Minmax         (class XfwfToggle)
     Height         (class XfwfToggle)
     Width          (class XfwfToggle)
     Point          (class XfwfToggle)
     Image properties (class Label)
     Minmaxpix      (class XfwfToggle)
     Xymean         (class XfwfToggle)
     Volume         (class XfwfToggle)
     Mean           (class XfwfToggle)
     Median         (class XfwfToggle)
     Stdev          (class XfwfToggle)
     Commands       (class Label)
     Region analyse (class XfwfButton)
     Statistics     (class XfwfButton)
     Quit           (class XfwfButton)
 colorsmenu         (class SimpleMenu)
   menuLabel        (class SmeBSB)
   backgroundcol    (class SmeBSB)
   Work-map         (class SmeBSB)
   colorsep         (class SmeLine)
   White - 256      (class SmeBSB)
   Black - 256      (class SmeBSB)
   Red - 256        (class SmeBSB)
   Green - 256      (class SmeBSB)
   Blue - 256       (class SmeBSB)
   Spectrum - 256   (class SmeBSB)
   Hue - 256        (class SmeBSB)
   Rainbow - 256    (class SmeBSB)
 overlaysmenu       (class SimpleMenu)
   menuLabel        (class SmeBSB)
   backgroundovl    (class SmeBSB)
   Std-overlay      (class SmeBSB)
   colorsep         (class SmeLine)
   White - mono     (class SmeBSB)
   Black - mono     (class SmeBSB)
 toolsmenu          (class SimpleMenu)
   menuLabel        (class SmeBSB)
   imageinfo        (class SmeBSB)
   histogram        (class SmeBSB)
   slice            (class SmeBSB)
 optionsmenu        (class SimpleMenu)
   menuLabel        (class SmeBSB)
   optionsmenusep   (class SmeLine)
   optionsmenuentry (class SmeBSB)
   optionsmenuentry (class SmeBSB)
   optionsmenuentry (class SmeBSB)
   optionsmenusep   (class SmeLine)
   optionsmenuentry (class SmeBSB)
   optionsmenuentry (class SmeBSB)
   optionsmenuentry (class SmeBSB)
 subjobmenu         (class SimpleMenu)
   menuLabel        (class SmeBSB)
   savebuffer       (class SmeBSB)
   killwindow       (class SmeBSB)

See also

regionAnalyse(1), statistics(1), ximage(3), ImageOverlay(3)

Files

$XITE_HOME/etc/app-defaults/XRegion

Author

Otto Milvang

Revised

Svein Bøe 22.11.95 and 96, Helene Schulerud 20.1.91, Tor L|nnestad 25.04.91, Otto Milvang 06.08.91

Examples

 xregion mona.img
 xregion -iw 1200 nbandimg.img:3

Id

$Id: xregion.c,v 1.100 1997/07/29 09:15:23 svein Exp $