def _iterate_sagittal_slices(array, limits=None):
 shape = array.shape[0]
 for ind in range(shape):
  if (limits and (ind not in limits)):
   continue
  (yield (ind, array[ind, :, :]))

def _iterate_sagittal_slices ( array , limits = None ) : shape = array . shape [ 0 ] for ind in range ( shape ) : if ( limits and ( ind not in limits ) ) : continue ( yield ( ind , array [ ind , : , : ] ) )
iterate sagittal slices .