The logical engines are pure plumbing: they don't produce information, they combine it. Their value comes from how cleanly they let multi-criterion analyses compose. A few representative cases:
Restrict detection to a region of interest. One mask defines the ROI; one mask is the unrestricted detection result. AND gives detection-within-ROI — equivalent to having run detection only inside the ROI to begin with, but achievable cleanly when the ROI is decided after detection.
Multi-marker positive cells. Two thresholding passes on two channels produce two masks ("positive for marker A," "positive for marker B"). AND gives the double-positive subset. LabelingLoading... the AND result and counting gives the double-positive cell count directly.
Subtract one detection from another. A naive way to compute "cells outside the tumor region" is: take the all-cells mask, AND it with the NOT of the tumor mask. The result is the set difference: cells minus tumor.
Compare two methods. Two segmentation algorithms run on the same image produce two masks. XOR shows where they differ; AND shows where they agree. The relative areas of these two outputs quantify methodological agreement.
Validation against ground truth. A manual annotation mask and an algorithmic-detection mask of the same field — XOR shows the disagreements (false positives + false negatives combined into a single mask), AND shows the true positives. Pixel counts of these regions become the components of standard segmentation metrics.
The with value variants are useful in narrower cases — bit-plane extraction from grayscale images, masking out specific bit-flag values — and rarely appear in routine workflows. The image-image variants are where the family lives.