#!/bin/sh # Mask one image with another using -mas (similar to multiplying # with -mul, but more robust): # if the mask is a label image, that should be okay. fslmaths img -mas mask -bin img_bin