You can use AFNI's 3dAllineate program. In particular,
3dAllineate -base dataset1+orig -source dataset2+orig -allcostX
should give you a printout of all the cost functions it uses to measure the difference between 2 volumes. Some of these are inverted, such as Mutual Information (MI), which is larger when the images are more similar, and since 3dAllineate minimizes cost functions, MI is negated in this printout.
For more information on the options you can add to 3dAllineate that affect the cost function calculations (masks and/or weights), see the output of '3dAllineate -HELP'
[
afni.nimh.nih.gov]
[
afni.nimh.nih.gov]