title: implement 3d sobel operator
body: <p>
  I am currently working on inhomogeniety removal from MRI data volume which contains voxels.
  I want to apply sobel operator on those volumes to find the gradient. I am familiar with 2d sobel mask and the neighbourhood of 2d images. 
  </p>
  
  <p>
  sobel mask:
  
      1  2  1
      0  0  0
      -1 -2 -1
  
      1  0 -1
      2  0 -2
      1  0 -1
  
  </p>
  
  <p>
  neighbourhood of(x,y):
  
      (x+1,y-1) (x+1,y) (x+1,y+1)
      (x,y-1)   (x,y)   (x,y+1)
      (x-1,y-1) (x-1,y) (x-1,y+1)
  
  </p>
  
  <p>
  Now I want to apply it on 3d.
  Please suggest me how should I proceed??
  Thank you.
  </p>