class_docstr: This is a generic class for 3D segmentation datasets.
  
  :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.
class_docstr_tok: ["This","is","a","generic","class","for","3D","segmentation","datasets",".",":","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","."]
docstr: Return the specific index pair volume (input, ground truth).
  
  :param index: volume index.
docstr_tok: ["Return","the","specific","index","pair","volume","(","input",",","ground","truth",")",".",":","param","index",":","volume","index","."]
code: def __getitem__(self, index):
      """Return the specific index pair volume (input, ground truth).
  
      :param index: volume index.
      """
      input_img, gt_img = self.handlers[index].get_pair_data()
      data_dict = {"input": input_img, "gt": gt_img}
      if self.transform is not None:
          data_dict = self.transform(data_dict)
      return data_dict
  
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 5 for calling the MRI3DSegmentationDataset obj's underlying member method code with example usage: obj.__getitem__(index) and returns: data_dict