class_docstr: Splits the input into patches with sliding window strategy and a possible overlap.
  It also allows offsetting the starting position and filtering the patches.
  
  Args:
      patch_size : the size of the patches to be generated.
      offset: the amount of offset for the patches with respect to the original input.  Defaults to 0.
      overlap: the amount of overlap between patches in each dimension. It can be either a float in
          the range of [0.0, 1.0) that defines relative overlap to the patch size, or it can be a non-negative int
          that defines number of pixels for overlap. Defaults to 0.0.
      filter_fn: a callable to filter patches. It should accepts exactly two parameters (patch, location), and
          return True for a patch to keep. Defaults to no filtering.
      pad_mode: string define the mode for `torch.nn.functional.pad`. The acceptable values are
          `"constant"`, `"reflect"`, `"replicate"`, `"circular"` or `None`. Default to `"constant"`.
          If None, no padding will be applied, so it will drop the patches crossing the border of
          the image (either when the offset is negative or the image is non-divisible by the patch_size).
      pad_value: the value for `"constant"` padding. Defaults to 0.
      device: the device where the patches are generated. Defaults to the device of inputs.
  
  Note:
      When a scaler value is provided for `patch_size`, `offset`, or `overlap`,
          it is broadcasted to all the spatial dimensions.
class_docstr_tok: ["Splits","the","input","into","patches","with","sliding","window","strategy","and","a","possible","overlap",".","It","also","allows","offsetting","the","starting","position","and","filtering","the","patches",".","Args",":","patch_size",":","the","size","of","the","patches","to","be","generated",".","offset",":","the","amount","of","offset","for","the","patches","with","respect","to","the","original","input",".","Defaults","to","0.","overlap",":","the","amount","of","overlap","between","patches","in","each","dimension",".","It","can","be","either","a","float","in","the","range","of","[","0.0",",","1.0",")","that","defines","relative","overlap","to","the","patch","size",",","or","it","can","be","a","non-negative","int","that","defines","number","of","pixels","for","overlap",".","Defaults","to","0.0.","filter_fn",":","a","callable","to","filter","patches",".","It","should","accepts","exactly","two","parameters","(","patch",",","location",")",",","and","return","True","for","a","patch","to","keep",".","Defaults","to","no","filtering",".","pad_mode",":","string","define","the","mode","for","`","torch.nn.functional.pad","`",".","The","acceptable","values","are","`","``","constant","''","`",",","`","``","reflect","''","`",",","`","``","replicate","''","`",",","`","``","circular","''","`","or","`","None","`",".","Default","to","`","``","constant","''","`",".","If","None",",","no","padding","will","be","applied",",","so","it","will","drop","the","patches","crossing","the","border","of","the","image","(","either","when","the","offset","is","negative","or","the","image","is","non-divisible","by","the","patch_size",")",".","pad_value",":","the","value","for","`","``","constant","''","`","padding",".","Defaults","to","0.","device",":","the","device","where","the","patches","are","generated",".","Defaults","to","the","device","of","inputs",".","Note",":","When","a","scaler","value","is","provided","for","`","patch_size","`",",","`","offset","`",",","or","`","overlap","`",",","it","is","broadcasted","to","all","the","spatial","dimensions","."]
docstr: Return the input spatial shape.
  
  Args:
      inputs: either a tensor of shape BCHW[D], representing a batch of images,
          or a filename (str) or list of filenames to the image(s).
  
  Returns:
      spatial_shape
docstr_tok: ["Return","the","input","spatial","shape",".","Args",":","inputs",":","either","a","tensor","of","shape","BCHW","[","D","]",",","representing","a","batch","of","images",",","or","a","filename","(","str",")","or","list","of","filenames","to","the","image","(","s",")",".","Returns",":","spatial_shape"]
code: def get_input_shape(self, inputs: Any) -> tuple:
      """
      Return the input spatial shape.
  
      Args:
          inputs: either a tensor of shape BCHW[D], representing a batch of images,
              or a filename (str) or list of filenames to the image(s).
  
      Returns:
          spatial_shape
      """
      return tuple(inputs.shape[2:])
  
imports: from __future__ import annotations
  import os
  import warnings
  from abc import ABC, abstractmethod
  from collections.abc import Callable, Iterable, Sequence
  from inspect import _empty, isclass, signature
  from typing import Any
  import torch
  from monai.data.utils import iter_patch_position
  from monai.data.wsi_reader import BaseWSIReader, WSIReader
  from monai.transforms.utility.array import convert_to_tensor
  from monai.utils.misc import PathLike, ensure_tuple, ensure_tuple_rep
label_desc: Use image node_id 6 for calling the SlidingWindowSplitter obj's underlying member method code with example usage: obj.get_input_shape(inputs) and returns: tuple