3D cross correlation considering the neighborhood pixels

I want to correlate two 3D images considering the neighborhood pixels. I couldn’t find any example based on it. Can i use ANTScrosscorrelation metric to do so? Is there any example related to this?