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.
code: def __init__(self, array, psize, cval=0):
      # process arguments
      self.array = numpy.asarray(array)
      if is_integer(psize):
          self.psize = [psize] * self.array.ndim
      else:
          self.psize = list(psize)
      self.cval = cval
  
      # validate
      if numpy.any([x <= 0 for x in self.psize]):
          raise ValueError(
              "The patch size must be at least 1 in any dimension."
          )
      elif len(self.psize) != self.array.ndim:
          raise ValueError(
              "The patch dimensionality must equal the array dimensionality."
          )
  
      # compute required padding as pairs
      self.padding = [(p / 2, p / 2 - (p - 1) % 2) for p in self.psize]
  
      # pad array
      self.array = numpy.pad(
          self.array,
          self.padding,
          mode="constant",
          constant_values=self.cval,
      )
  
      # initialize slicers
      slicepoints = [
          list(range(0, s - p + 1))
          for s, p in zip(self.array.shape, self.psize)
      ]
      self.__slicepointiter = product(*slicepoints)
  
imports: from itertools import product
  import numpy
  from operator import itemgetter
  from scipy.ndimage import find_objects
label_desc: Use image node_id 1 to create a new SlidingWindowIterator object  with example: obj = SlidingWindowIterator(array, psize, cval)