Masking is an extremely useful function within SPM. For example, you might want to see whether your parietal cue-related activation is subsumed by, or independent of, the parietal retrieval-success activation that is reliably found in the literature – in this case you would mask your cueing activation by retrieval success (inclusively to see the overlap, exclusively to see the independence).
The drawback with standard SPM5 masking procedure is that you are only able to select a contrast with which to mask that is defined within the same SPM.mat as your original contrast of interest. There are a few ways around this limitation which allow you to mask be a contrast defined in another SPM.mat file, such as by using the ImCalc function, or using F-contrasts in which you specify multiple contrasts at the second-level. However, the best solution I have found was posted to the SPM mailing list by Jan Gläscher.
If you follow the instructions and replace the existing spm_getSPM.m file with Jan’s modified file. You’ll need to restart SPM (maybe even Matlab), but once you do, when you click through Results and select the your first contrast of interest from the first SPM.mat (the one you want to mask) you will be able to select a different SPM.mat from which to choose a contrast to mask the first one with as follows:
It certainly beats messing about with ImCalc.