1from nipype.interfaces.dcm2nii import Dcm2niix
2def convert_dcm_2_nii_x(dcm_folder, output_folder):
3 converter = Dcm2niix()
4 converter.inputs.source_dir = dcm_folder
5 converter.inputs.output_dir = output_folder
6 converter.inputs.compress = 'i'
7 converter.run()