Note: wfu_pickatlas is particularly good during mask creation as it creates binarized ROI straight up.
Mask image A with ‘not B’
To deal with double contrasts.
fslmaths B -bin -mul -1 -add 1 -mas A A_NOT_B
Creating functional ROI…
Mask image A (e.g., structural ROI) with B (functional ROI)
fslmaths B -mul A A_and_B