#!/bin/sh # Subtract one mask from another. Binarize the resulting difference # with -bin to get rid of negative numbers. See the jaccard index to expand on this use. fslmaths mask1 -sub mask2 -bin mask_diff