class_docstr: SlidingWindow
  Sliding window iterator which produces slice objects to slice in a sliding
  window. This is useful for inference.
docstr: Constructs a sliding window iterator
  
  Args:
      img_shape (array_like): shape of the image to slide over
  
      window_shape (array_like): shape of the window to extract
  
      has_batch_dim (bool, optional): flag to indicate whether a batch
          dimension is present
  
      striding (array_like, optional): amount to move the window between
          each position
code: def __init__(
      self, img_shape, window_shape, has_batch_dim=True, striding=None
  ):
      """Constructs a sliding window iterator
  
      Args:
          img_shape (array_like): shape of the image to slide over
  
          window_shape (array_like): shape of the window to extract
  
          has_batch_dim (bool, optional): flag to indicate whether a batch
              dimension is present
  
          striding (array_like, optional): amount to move the window between
              each position
      """
  
      self.img_shape = img_shape
      self.window_shape = window_shape
      self.rank = len(img_shape)
      self.curr_pos = [0] * self.rank
      self.end_pos = [0] * self.rank
      self.done = False
      self.striding = window_shape
      self.has_batch_dim = has_batch_dim
      if striding:
          self.striding = striding
  
file_path: DLTK/dltk/utils.py
imports: from __future__ import unicode_literals
  from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import numpy
label_desc: Use image node_id 1 to create a new SlidingWindow object from inherited base classes: object with example: obj = SlidingWindow(img_shape, window_shape, has_batch_dim, striding)