class_docstr: Pass in a custom dataset that conforms to the format.
  
  Args:
      transforms (list): Transforms for image.
      dataset_root (str): The dataset directory.
      num_classes (int): Number of classes.
      result_dir (str): The directory to save the next phase result.
      mode (str, optional): which part of dataset to use. it is one of ('train', 'val', 'test'). Default: 'train'.
      ignore_index (int, optional): The index that ignore when calculate loss.
      repeat_times (int, optional): Repeat times of dataset.
      Examples:
  
          import medicalseg.transforms as T
          from paddleseg.datasets import MedicalDataset
  
          transforms = [T.RandomRotation3D(degrees=90)]
          dataset_root = 'dataset_root_path'
          dataset = MedicalDataset(transforms = transforms,
                            dataset_root = dataset_root,
                            num_classes = 3,
                            mode = 'train')
  
          for data in dataset:
              img, label = data
              print(img.shape, label.shape)
              print(np.unique(label))
class_docstr_tok: ["Pass","in","a","custom","dataset","that","conforms","to","the","format",".","Args",":","transforms","(","list",")",":","Transforms","for","image",".","dataset_root","(","str",")",":","The","dataset","directory",".","num_classes","(","int",")",":","Number","of","classes",".","result_dir","(","str",")",":","The","directory","to","save","the","next","phase","result",".","mode","(","str",",","optional",")",":","which","part","of","dataset","to","use",".","it","is","one","of","(","'train","'",",","'val","'",",","'test","'",")",".","Default",":","'train","'",".","ignore_index","(","int",",","optional",")",":","The","index","that","ignore","when","calculate","loss",".","repeat_times","(","int",",","optional",")",":","Repeat","times","of","dataset",".","Examples",":","import","medicalseg.transforms","as","T","from","paddleseg.datasets","import","MedicalDataset","transforms","=","[","T.RandomRotation3D","(","degrees=90",")","]","dataset_root","=","'dataset_root_path'","dataset","=","MedicalDataset","(","transforms","=","transforms",",","dataset_root","=","dataset_root",",","num_classes","=","3",",","mode","=","'train","'",")","for","data","in","dataset",":","img",",","label","=","data","print","(","img.shape",",","label.shape",")","print","(","np.unique","(","label",")",")"]
docstr: Save the preprocessed images to the result_dir
docstr_tok: ["Save","the","preprocessed","images","to","the","result_dir"]
code: def save_transformed(self):
      """Save the preprocessed images to the result_dir"""
      pass
  
file_path: PaddleSeg/contrib/MedicalSeg/medicalseg/datasets/dataset.py
imports: import os
  import paddle
  import numpy
  from PIL import Image
  from medicalseg.cvlibs import manager
  from medicalseg.transforms import Compose
  from medicalseg.utils.env_util import seg_env
  import medicalseg.transforms.functional
  from medicalseg.utils.download import download_file_and_uncompress
label_desc: Use image node_id 3 for calling the MedicalDataset obj's underlying member method code with example usage: obj.save_transformed() without return types