Solved by fepegar in post #2 
              
              
                Hi, @Faraz. You can use TorchIO for that: https://colab.research.google.com/github/fepegar/miccai-educational-challenge-2020/blob/master/Data_preprocessing_and_augmentation_using_TorchIO_a_tutorial.ipynb