Masked-Based Selection Filter

Applies a mask to input data and exludes pixels that aren’t part of the mask itself. The values of pixels that are considered to be background will be replaced with a default value in the output to indicate that they are masked.

Category

category_mask_selection Mask and Selection

Node

maskbasedselection_node

Parameters

ApplicableGroupHandling: Whether the applicable groups should be treated as foreground or background. This is only relevant if the second input is connected to classification results.

Applicable (per-group): whether a given group is considered to be applicable to the filter or not. This is only relevant if the second input is connected to classification results.

Inputs

Input: the input data to mask

Mask/Classification: either a mask or a classification result

Outputs

Output: the masked data

Effect of the Filter

If a mask is connected to the second input of the filter, the mask will tell this filter which pixel is considered to be a foreground pixel and which pixel is considered to be a background pixel. The parameters of this filter will have no effect on the result.

If a classification result is connected to the second input of the filter, this filter allows the user to select which groups should be considered background and which should be considered foreground. This is done by marking specific groups to be applicable via the Applicable parameter. If ApplicableGroupHandling is TreatAsBackground all pixels that have a classification result of an applicable group will be considered to be part of the background (and all of the other pixels to be part of the foreground); if ApplicableGroupHandling is TreatAsForeground all pixels that have a classification result of an applicable group will be considered to be part of the foreground (and all other pixels to be part of the background). Any unclassified pixel will always be considered to be part of the background.

The output will be identical to the input for all pixels that have been determined to be foregronud pixels. Background pixels, on the other hand, will be masked out by replacing their values with a default replacement values that indicates they are masked out. In the case of numerical data, NaN (not a number) will be used as that replacement value. If the mask is applied to input that is itself a mask, the replacement value will be -1 (background). If the mask is applied to input that itself is a classification result, the replacement value will be -1 (unclassified).

If a mask is used as the second input of this filter, the mask will typically be the result of either a Background Masking Filter or a Threshold Filter applied to the result of an Instrument Function Filter.

See also