class_docstr: Moves a sliding window over the array, where the first patch is places centered on
  the top-left voxel and outside-of-image values filled with `cval`. The returned
  patches are views if the array.
  
  All yielded patches will be of size ``psize``. Areas outside of the array are
  filled with ``cval``. Besides the patch, a patch mask is returned, that denoted
  the outside values.
  
  Central element for even patches:
  
      [[0, 0],
       [0, X]]
  
  Parameters
  ----------
  array : array_like
      A n-dimensional array.
  psize : int or sequence of ints
      The patch size. If a single integer interpreted as hyper-cube.
  cval : number
      Value to fill undefined positions.
docstr: Yields the next patch.
  
  Returns
  -------
  patch : ndarray
      The extracted patch as a view.
  pmask : ndarray
      Boolean array denoting the defined part of the patch.
  slicer : list
      List of slicers to apply the same operation to another array (using applyslicer()).
docstr_tok: ["Yields","the","next","patch",".","Returns","--","--","--","-","patch",":","ndarray","The","extracted","patch","as","a","view",".","pmask",":","ndarray","Boolean","array","denoting","the","defined","part","of","the","patch",".","slicer",":","list","List","of","slicers","to","apply","the","same","operation","to","another","array","(","using","applyslicer","(",")",")","."]
code: def __next__(self):
      """
      Yields the next patch.
  
      Returns
      -------
      patch : ndarray
          The extracted patch as a view.
      pmask : ndarray
          Boolean array denoting the defined part of the patch.
      slicer : list
          List of slicers to apply the same operation to another array (using applyslicer()).
      """
      # trigger internal iterators
      spointset = next(
          self.__slicepointiter
      )  # will raise StopIteration when empty
      # compute slicer object
      slicer = []
      padder = []
      for dim, sp in enumerate(spointset):
          slicer.append(slice(sp, sp + self.psize[dim]))
          padder.append(
              (
                  max(0, -1 * (sp - self.padding[dim][0])),
                  max(
                      0,
                      (sp + self.psize[dim])
                      - (self.array.shape[dim] - 1),
                  ),
              )
          )
  
      # create patch and patch mask
      def_slicer = [
          slice(x, None if 0 == y else -1 * y) for x, y in padder
      ]
      patch = self.array[slicer]
      patch = patch.reshape(self.psize)
      pmask = numpy.zeros(self.psize, numpy.bool_)
      pmask[def_slicer] = True
  
      return patch, pmask, slicer
  
imports: from itertools import product
  import numpy
  from operator import itemgetter
  from scipy.ndimage import find_objects
label_desc: Use image node_id 3 for calling the SlidingWindowIterator obj's underlying member method code with example usage: obj.__next__() and returns: patch,  pmask,  slicer