Skip to content

Region Selection vTool#

The Region Selection vTool allows you to select regions according to different region features.

Typically, you would use the Region Selection vTool after the Region Morphology vTool to eliminate unwanted regions and select only the desired target regions.

The Region Selection vTool accepts regions or region arrays via the Regions input pin and outputs region arrays via the Regions output pin.

If you use the Calibration vTool before feature selection and connect the Transformation output/input pins of both vTools, the transformation data supplied by the Calibration vTool allows the Region Selection vTool to select regions not only by area sizes in pixels but also by square millimeters (the Square Millimimeters option becomes available in the settings dialog in the Area section).

Region Selection vTool

How It Works#

You can select regions based on the following region features:

  • Area: The area of a region is expressed either as the number of pixels of a region or its area in square millimeters if you're supplying transformation data via the Calbration vTool.
  • Roundness: Roundness is a measure of how similar a region is to a circle. It is calculated based on the distances between the pixels at the edge of the region to the center of the region. A perfect circle has a roundness of one. Roundness is expressed by the following formula:

    Roundness = 1 – distance deviation / distance mean

  • Rectangularity: Rectangularity is a measure of how similar a region is to a rectangle. It is calculated by first determining a rectangle that best fits the region. Then, the relative difference between the area of the input region and the area of the best-fit rectangle counterpart is determined. A perfect rectangle has a rectangularity of one.

In most applications, you would input multiple regions, i.e., region arrays, into the Region Selection vTool. If the previous vTool outputs only individual regions, e.g., the thresholding vTools or the Calibration vTool, you can use the Region Morphology vTool to split regions.

Configuring the vTool#

To configure the Region Selection vTool:

Region Selection vTool Settings

  1. In the Recipe Management pane in the vTool Settings area, click Open Settings or double-click the vTool.
    The Region Selection dialog opens.
  2. Enable the region features that you want to base your selection on.
  3. If you enabled Area, select the desired unit in the drop-down list and specify the minimum and maximum area sizes. If you don't want to specify an upper limit, select the Unlimited check box.
  4. If you enabled Roundness, specify the minimum and maximum values. The value range is 0.0 to 1.0.
  5. If you enabled Rectangularity, specify the minimum and maximum values. The value range is 0.0 to 1.0.


You can enable more than one region feature. All enabled region features have to be fulfilled by a region to be selected.

You can view the result of the feature selection in a pin data view. Here, you can select which outputs to display.



Accepts a single or multiple regions.

  • Data type: Region, Region Array


Accepts transformation data from the Calibration vTool.

  • Data type: Transformation Data



Returns the processed regions.

  • Data type: Region Array

Typical Predecessors#

Typical Successors#