OOF2: The Manual

Name

OOF.Graphics_n.Toolbox.Pixel_Select.Rectangle — Drag to select a rectangular region.

Synopsis

OOF.Graphics_n.Toolbox.Pixel_Select.Rectangle(source, points, shift, ctrl)

Details

  • Parent Menu: OOF.Graphics_n.Toolbox.Pixel_Select
  • Callback: function PixelSelectToolbox.selectCB in module ooflib.common.IO.genericselecttoolbox
  • Parameters:

    source
    Microstructure or Image Type: The path to an OOF2 object.
    points
    Type: A list of Point objects.
    shift
    True for addition. Type: Boolean: True or False.
    ctrl
    True for toggle. Type: Boolean: True or False.

Description

Select a contiguous set of pixels by dragging out a rectangle with the mouse.

The source parameter is the path to a Microstructure or Image. If it's an Image, the selection is made in the Microstructure in which the Image resides.

The points parameter is a Python list of Points in the Microstructure, indicating the mouse motion. It should contain just two points, at diagonally opposite corners of the rectangle. If the list contains more than two points, only the first and last will be used.

The shift and ctrl parameters govern how the current selection (i.e, the set of objects defined by this operation) is merged with the previous selection (the objects already selected) to form a new selection, as shown in Table 6.1. They indicate whether (True) or not (False) the shift and control keys were depressed during the mouse click that initiated this command.

Figure 6.20. Selecting a Rectangular Region of Pixels

Selecting a Rectangular Region of Pixels

(a) To select a rectangle, click the mouse at one corner and drag to the diagonally opposite corner, as shown by the yellow arrow.

(b) The pixels selected by (a).