vox-n-op Map out ND-array element pairs for neighborhood operations (e.g., filtering) Reference Partly based on this answer by Matt J on MATLAB Central