class_docstr: This is a generic class for 3D segmentation datasets. This class overload
  MRI3DSegmentationDataset by splitting the initials volumes in several
  subvolumes. Each subvolumes will be of the sizes of the length parameter.
  
  This class also implement a padding parameter, which overlap the borders of
  the different (the borders of the upper-volume aren't superposed). For
  example if you have a length of (32,32,32) and a padding of 16, your final
  subvolumes will have a total lengths of (64,64,64) with the voxels contained
  outside the core volume and which are shared with the other subvolumes.
  
  Be careful, the input's dimensions should be compatible with the given
  lengths and paddings. This class doesn't handle missing dimensions.
  
  :param filename_pairs: a list of tuples in the format (input filename,
                         ground truth filename).
  :param cache: if the data should be cached in memory or not.
  :param transform: transformations to apply.
  :param length: size of each dimensions of the subvolumes
  :param padding: size of the overlapping per subvolume and dimensions
class_docstr_tok: ["This","is","a","generic","class","for","3D","segmentation","datasets",".","This","class","overload","MRI3DSegmentationDataset","by","splitting","the","initials","volumes","in","several","subvolumes",".","Each","subvolumes","will","be","of","the","sizes","of","the","length","parameter",".","This","class","also","implement","a","padding","parameter",",","which","overlap","the","borders","of","the","different","(","the","borders","of","the","upper-volume","are","n't","superposed",")",".","For","example","if","you","have","a","length","of","(","32,32,32",")","and","a","padding","of","16",",","your","final","subvolumes","will","have","a","total","lengths","of","(","64,64,64",")","with","the","voxels","contained","outside","the","core","volume","and","which","are","shared","with","the","other","subvolumes",".","Be","careful",",","the","input","'s","dimensions","should","be","compatible","with","the","given","lengths","and","paddings",".","This","class","does","n't","handle","missing","dimensions",".",":","param","filename_pairs",":","a","list","of","tuples","in","the","format","(","input","filename",",","ground","truth","filename",")",".",":","param","cache",":","if","the","data","should","be","cached","in","memory","or","not",".",":","param","transform",":","transformations","to","apply",".",":","param","length",":","size","of","each","dimensions","of","the","subvolumes",":","param","padding",":","size","of","the","overlapping","per","subvolume","and","dimensions"]
docstr: Return the dataset size. The number of subvolumes.
docstr_tok: ["Return","the","dataset","size",".","The","number","of","subvolumes","."]
code: def __len__(self):
      """Return the dataset size. The number of subvolumes."""
      return len(self.indexes)
  
imports: import os
  import re
  import collections
  from medicaltorch import transforms
  from tqdm import tqdm
  import numpy
  import nibabel
  from torch.utils.data import Dataset
  import torch
  from torch._six import string_classes, int_classes
  from PIL import Image
label_desc: Use image node_id 3 for calling the MRI3DSubVolumeSegmentationDataset obj's underlying member method code with example usage: obj.__len__() and returns: len