> I am wondering, in the HDW toolbox, is it possible to specify a mask image > over which the likelihood potentials are calculated? No. Not without quite a lot of additional coding. > Or does it even make > sense to do that? I am wondering if it is possible to constrain the > warping algorithm such that its cost function is calculated only in the > masked regions. I have noticed that in some images where there is > extremely bright dura near the brain, the presence of the dura in one image > but not the other seems to be driving the warping, i.e. the warping field > calculated over the brain voxels near this bit of dura seems to be heavily > influenced by the presence or absence of the dura. In other words, we are > finding large regions of "expansion" or "contraction" in the brain voxels > near the bright dura, but it seems to be a result of the algorithm trying > to match the dura between the two scans. I have tried simply extracting > the brain from both images, which seems to help in some ways, but I believe > it introduces artificial edges which have their own unintended effects on > the result. Sorry for the long winded explanation, but is there a way to > mask out certain voxels from the likelihood potential calculation without > introducing an artificial edge? Thanks for any insight you can offer, I don't have any bright ideas that would help here. Are you doing inter-subject registration? If so, then you could try the DARTEL toolbox, which warps GM to GM and WM to WM. Best regards, -John