<jupyter_start><jupyter_text>Set the inputFolder in the config.yml and read that<jupyter_code>import yaml
import os
import pydicom
import numpy as np
import dicom2nifti
with open("config.yml",'r') as myconfig:
    cfg = yaml.load(myconfig)
inputImage = cfg['inputDicom']
outputImage = cfg['outputDicom']
import dicom2nifti
patients = os.listdir(inputImage)
for patient in patients:
        main_folder = inputImage+"/"+ patient + "/" + patient
        mask_folder = inputImage+"/"+ patient + "/" + patient + "-MASS"
        if (os.path.isdir(main_folder) and os.path.isdir(mask_folder)):
            main_output_path = outputImage +"/"+ patient
            mask_output_path = outputImage +"/"+ patient+ "-MASS"
            os.makedirs(main_output_path)
            os.makedirs(mask_output_path)
            dicom2nifti.convert_directory(main_folder, main_output_path)
            dicom2nifti.convert_directory(mask_folder, mask_output_path)
    

print(folder_path)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10854271356783919, 'fraction_numerical': 0.004020100502512563, 'mean_word_length': 3.7884615384615383, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '555543', 'license': 'MIT', 'n_tokens_mistral': 335, 'n_tokens_neox': 330, 'n_words': 65, 'path': 'PyradiomicsExample/Jupyter/DicomToNrr.ipynb', 'repo_name': 'FarnooshKh/JoyOfLearning', 'size': '995'}