questions > Exception value: dcm2nii is not present in your PATH environment.
Showing 1-2 of 2 posts
Display:
Results per page:
Mar 16, 2020  04:03 AM | Stephen Tsou
Exception value: dcm2nii is not present in your PATH environment.
Hi,


I am trying to run a preprocessing script in clinica (https://github.com/aramis-lab/clinica/wi...) that converts fmri data in the form of .nii files to BIDS files.   I have a miniconda virtual environment for clinica and have tried conda/pip installing dcm2nii or dcm2niix and have the zip file from this site downloaded but not exactly sure where to put what files.  I currently run into the following thrown exception:

***********************
*** Clinica crashed ***
***********************

Exception type: RuntimeError
Exception value: dcm2nii is not present in your PATH environment.
Below are displayed information that were gathered when Clinica crashed. This will help to understand what happened if you transfer those information to the Clinica development team.
===============================================================================================================================================================
0 /home/stsou/miniconda2/envs/clinicaldl_env/bin/clinica 10 sys.exit(execute())
1 /home/stsou/miniconda2/envs/clinicaldl_env/lib/python3.6/site-packages/clinica/cmdline.py 520 execute args.func(args)
2 /home/stsou/miniconda2/envs/clinicaldl_env/lib/python3.6/site-packages/clinica/iotools/converters/adni_to_bids/adni_to_bids_cli.py 57 run_command adni_to_bids.check_adni_dependencies()
3 /home/stsou/miniconda2/envs/clinicaldl_env/lib/python3.6/site-packages/clinica/iotools/converters/adni_to_bids/adni_to_bids.py 38 check_adni_dependencies 'in your PATH environment.' % binary)


Should anybody know how to put dcm2nii in the PATH environment, might they let me know?  I am new to nitrc and MRIcron.  

best,
Stephen
Mar 16, 2020  05:03 AM | Chris Rorden
RE: Exception value: dcm2nii is not present in your PATH environment.
You can always get the latest stable release of dcm2niix from the Github releases web page. Alternatively, you can run appropriate curl command from the command line:

For Linux
  curl -fLO https://github.com/rordenlab/dcm2niix/re...
For MacOS:
  curl -fLO https://github.com/rordenlab/dcm2niix/re...
For Windows:
  curl -fLO https://github.com/rordenlab/dcm2niix/re...

Once you have downloaded dcm2niix, copy the uncompressed executable to a location in your path.

I would strongly heed the warning from dcm2nii that you should upgrade to dcm2niix. I am a teach, administrator and research scientist. These duties limit the amount of time I can support software. The only reason to use the legacy dcm2nii is if you are trying to convert a medical image that predates DICOM (e.g. proprietary Siemens or GE data from the 1990's).

You may want to generate a Github issues for Clinica, suggesting ways that their script check the dependency and provides users advice on how to install dcm2niix. dcm2niix uses the BSD License, so they can package it with their tool. Alternatively, they can use the curl call (above) to install the latest stable release.