I want to convert dicom files to nifty files, but I got this problem.
This is the source code:
converter = Dcm2niix()
converter.inputs.source_dir = source_dir
converter.inputs.compression = 9
converter.inputs.output_dir = output_dir
converter.inputs.out_filename = 'DWI'
converter.inputs.bids_format = False
converter.run()
Could you please help me figure it out?
- You should upgrade to the latest version of dcm2niix (from
2024) instead of a version from 2021.
- You will want to install a version of dcm2niix that has support
for compressed DICOM transfer syntaxes.
You can get dcm2niix here:
https://github.com/rordenlab/dcm2niix/re...
dcm2niix can be compiled with or without support for compressed transfer syntaxes. You can see this in the first line of the output. For example, an executable that supports JPEG2000 (JP2) and JPEG-lossless (JP-LS) would report:
Chris Rorden's dcm2niiX version v1.0.20240202 (JP2:OpenJPEG) (JP-LS:CharLS) Clang12.0.0 ARM (64-bit MacOS)
If you are unable to install a modern version of dcm2niix compiled with support for compressed images, you can decompress your images using dcmdjpeg
https://support.dcmtk.org/docs/dcmdjpeg.html