title: numpy extract 3d cubes from 3d array
body: <p>I would like to extract the 3D cubes (3x3x3) from a boolean 3D array of (180x180x197). This is similar to scipy.ndimage.measurements.label but need to fixed size of (3x3x3). 
  Is there a fast way of doing this than using for loops. </p>