code: def __init__(self, root_dir, img_list, sets):
      with open(img_list, "r") as f:
          self.img_list = [line.strip() for line in f]
      print("Processing {} datas".format(len(self.img_list)))
      self.root_dir = root_dir
      self.input_D = sets.input_D
      self.input_H = sets.input_H
      self.input_W = sets.input_W
      self.phase = sets.phase
  
file_path: MedicalNet/datasets/brains18.py
imports: import math
  import os
  import random
  import numpy
  from torch.utils.data import Dataset
  import nibabel
  from scipy import ndimage
label_desc: Use image node_id 1 to create a new BrainS18Dataset object from inherited base classes: Dataset with example: obj = BrainS18Dataset(root_dir, img_list, sets)