icometrix / dicom2nifti

MIT License
333 stars 78 forks source link

Philips Multiframe with ADC isn't truncated appropriately #122

Open ma-tripleT opened 2 years ago

ma-tripleT commented 2 years ago

Hi Team,

For Philips Multiframe diffusion images that have ADC, in _convertphilips.py the function _create_bvals_bvecs() makes a call out to _fix_diffusion_images()for the purposes of removing the ADC, and a truncated nifti is returned.

However _create_bvals_bvecs() doesn't return this truncated file back up to_multiframe_to_nifti() which means the NIfTI that is saved will be one frame longer than the BVAL and BVEC files.

This could easily be fixed with the addition of nifti being returned at line 535 and an additional variable output_file to line 271.

Thanks, Matthew