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 actual spatial shape covered by the output split patches.
  For instance, if the input image is padded, the actual spatial shape will be enlarged
  and not the same as 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:
      padded_spatial_shape
docstr_tok: ["Return","the","actual","spatial","shape","covered","by","the","output","split","patches",".","For","instance",",","if","the","input","image","is","padded",",","the","actual","spatial","shape","will","be","enlarged","and","not","the","same","as","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",":","padded_spatial_shape"]
code: def get_padded_shape(self, inputs: Any) -> tuple:
      """
      Return the actual spatial shape covered by the output split patches.
      For instance, if the input image is padded, the actual spatial shape will be enlarged
      and not the same as 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:
          padded_spatial_shape
  
      """
      spatial_shape = self.get_input_shape(inputs)
      if not self.pad_mode:
          return spatial_shape
      spatial_ndim = len(spatial_shape)
      patch_size, overlap, offset = self._get_valid_shape_parameters(
          spatial_shape
      )
      pad_size, _ = self._calculate_pad_size(
          spatial_shape, spatial_ndim, patch_size, offset, overlap
      )
      padded_spatial_shape = tuple(
          ss + ps + pe
          for ss, ps, pe in zip(
              spatial_shape, pad_size[1::2], pad_size[::2]
          )
      )
  
      return padded_spatial_shape
  
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 7 for calling the SlidingWindowSplitter obj's underlying member method code with example usage: obj.get_padded_shape(inputs) and returns: padded_spatial_shape, spatial_shape