Hello All!
I’m a beginner at mrtrix and I have been trying out the following command:
dwi2response msmt_5tt 102513_DWI.mif 102513_5TT_freesurfer.mif 102513_RF_WM_freesurfer.txt 102513_RF_GM_freesurfer.txt 102513_RF_CSF_freesurfer.txt -voxels 102513_RF_voxels_freesurfer.mif
However I seem to keep getting the following error:
dwi2response:
dwi2response: *Note that this script makes use of commands / algorithms that have relevant articles for citation. Please consult the help page (-help option) for more information.*
dwi2response:
dwi2response: *Generated temporary directory: /home/rkumar/hcp_sc/dwi2response-tmp-T2VI9Z/*
*Command:* mrconvert /home/rkumar/hcp_sc/connectomes_freesurfer/102513_DWI.mif /home/rkumar/hcp_sc/dwi2response-tmp-T2VI9Z/dwi.mif -stride 0,0,0,1
*Command:* mrconvert /home/rkumar/hcp_sc/connectomes_freesurfer/102513_5TT_freesurfer.mif /home/rkumar/hcp_sc/dwi2response-tmp-T2VI9Z/5tt.mif
dwi2response: *Changing to temporary directory (/home/rkumar/hcp_sc/dwi2response-tmp-T2VI9Z/)*
*Command:* dwi2mask dwi.mif mask.mif
*Command:* 5ttcheck 5tt.mif
*Command:* dwi2tensor dwi.mif - -mask mask.mif | tensor2metric - -fa fa.mif -vector vector.mif
*Function:* shutil.copy(vector.mif, dirs.mif)
*Command:* mrtransform 5tt.mif 5tt_regrid.mif -template fa.mif -interp linear
*Command:* mrconvert 5tt_regrid.mif - -coord 3 2 -axes 0,1,2 | mrcalc - 0.95 -gt mask.mif -mult wm_mask.mif
*Command:* mrconvert 5tt_regrid.mif - -coord 3 0 -axes 0,1,2 | mrcalc - 0.95 -gt fa.mif 0.2 -lt -mult mask.mif -mult gm_mask.mif
*Command:* mrconvert 5tt_regrid.mif - -coord 3 3 -axes 0,1,2 | mrcalc - 0.95 -gt fa.mif 0.2 -lt -mult mask.mif -mult csf_mask.mif
dwi2response: *Calling dwi2response recursively to select WM single-fibre voxels using 'tournier' algorithm*
*Command:* dwi2response tournier dwi.mif wm_ss_response.txt -mask wm_mask.mif -voxels wm_sf_mask.mif -tempdir /home/rkumar/hcp_sc/dwi2response-tmp-T2VI9Z/
dwi2response:
dwi2response: **[ERROR] Command failed: dwi2response tournier dwi.mif wm_ss_response.txt -mask wm_mask.mif -voxels wm_sf_mask.mif -tempdir /home/rkumar/hcp_sc/dwi2response-tmp-T2VI9Z/** *(msmt_5tt.py:83)*
dwi2response: *Output of failed command:*
dwi2response:
dwi2response: *Note that this script makes use of commands / algorithms that have relevant articles for citation. Please consult the help page (-help option) for more information.*
dwi2response:
dwi2response: *Generated temporary directory: /home/rkumar/hcp_sc/dwi2response-tmp-T2VI9Z/dwi2response-tmp-REM08P/*
*Command:* mrconvert /home/rkumar/hcp_sc/dwi2response-tmp-T2VI9Z/dwi.mif - -stride 0,0,0,1 | dwiextract - /home/rkumar/hcp_sc/dwi2response-tmp-T2VI9Z/dwi2response-tmp-REM08P/dwi.mif -singleshell -no_bzero
*Command:* mrconvert /home/rkumar/hcp_sc/dwi2response-tmp-T2VI9Z/wm_mask.mif /home/rkumar/hcp_sc/dwi2response-tmp-T2VI9Z/dwi2response-tmp-REM08P/mask.mif -datatype bit
dwi2response: *Changing to temporary directory (/home/rkumar/hcp_sc/dwi2response-tmp-T2VI9Z/dwi2response-tmp-REM08P/)*
dwi2response: **[ERROR] Input mask does not contain any voxels**
dwi2response: *Changing back to original directory (/home/rkumar/hcp_sc/dwi2response-tmp-T2VI9Z)*
dwi2response: *Contents of temporary directory kept, location: /home/rkumar/hcp_sc/dwi2response-tmp-T2VI9Z/dwi2response-tmp-REM08P/*
dwi2response: *Changing back to original directory (/home/rkumar/hcp_sc)*
dwi2response: Script failed while executing the command: dwi2response tournier dwi.mif wm_ss_response.txt -mask wm_mask.mif -voxels wm_sf_mask.mif -tempdir /home/rkumar/hcp_sc/dwi2response-tmp-T2VI9Z/
dwi2response: For debugging, inspect contents of temporary directory: /home/rkumar/hcp_sc/dwi2response-tmp-T2VI9Z/
I even tried to change the response algorithm I was using to dhollander but I keep get getting this error with that too:
dwi2response:
dwi2response: *Note that this script makes use of commands / algorithms that have relevant articles for citation. Please consult the help page (-help option) for more information.*
dwi2response:
dwi2response: *Generated temporary directory: /home/rkumar/hcp_sc/dwi2response-tmp-3O5Z07/*
*Command:* mrconvert /home/rkumar/hcp_sc/connectomes_freesurfer/102513_DWI.mif /home/rkumar/hcp_sc/dwi2response-tmp-3O5Z07/dwi.mif -stride 0,0,0,1
dwi2response: *Changing to temporary directory (/home/rkumar/hcp_sc/dwi2response-tmp-3O5Z07/)*
*Command:* dwi2mask dwi.mif mask.mif
dwi2response: *4 unique b-value(s) detected: 5,998,1998,2996 with 18,90,90,90 volumes.*
*Command:* maskfilter mask.mif erode eroded_mask.mif -npass 3
*Command:* dwiextract dwi.mif -shell 5 - | mrmath - mean mean_b5.mif -axis 3
*Command:* mrcalc mean_b5.mif -finite mean_b5.mif 0 -if 0 -le err_b5.mif -datatype bit
*Command:* dwiextract dwi.mif -shell 998 - | mrmath - mean mean_b998.mif -axis 3
*Command:* mrcalc mean_b998.mif -finite mean_b998.mif 0 -if 0 -le err_b998.mif -datatype bit
*Command:* mrcalc mean_b5.mif mean_b998.mif -divide -log sdm_b998.mif
*Command:* dwiextract dwi.mif -shell 1998 - | mrmath - mean mean_b1998.mif -axis 3
*Command:* mrcalc mean_b1998.mif -finite mean_b1998.mif 0 -if 0 -le err_b1998.mif -datatype bit
*Command:* mrcalc mean_b5.mif mean_b1998.mif -divide -log sdm_b1998.mif
*Command:* dwiextract dwi.mif -shell 2996 - | mrmath - mean mean_b2996.mif -axis 3
*Command:* mrcalc mean_b2996.mif -finite mean_b2996.mif 0 -if 0 -le err_b2996.mif -datatype bit
*Command:* mrcalc mean_b5.mif mean_b2996.mif -divide -log sdm_b2996.mif
*Command:* mrcalc sdm_b998.mif 90 -mult sdm_b1998.mif 90 -mult -add sdm_b2996.mif 90 -mult -add 270 -divide full_sdm.mif
*Command:* mrcalc full_sdm.mif -finite full_sdm.mif 0 -if 0 -le err_sdm.mif -datatype bit
*Command:* mrcalc err_b5.mif err_b998.mif -add err_b1998.mif -add err_b2996.mif -add err_sdm.mif -add 0 eroded_mask.mif -if safe_mask.mif -datatype bit
*Command:* mrcalc safe_mask.mif full_sdm.mif 0 -if 10 -min safe_sdm.mif
*Command:* dwi2tensor dwi.mif - -mask safe_mask.mif | tensor2metric - -fa safe_fa.mif -vector safe_vecs.mif -modulate none -mask safe_mask.mif
*Command:* mrcalc safe_mask.mif safe_fa.mif 0 -if 100.0 -gt crude_wm.mif -datatype bit
*Command:* mrcalc crude_wm.mif 0 safe_mask.mif -if _crudenonwm.mif -datatype bit
mrstats: **[ERROR] Cannot output statistic of interest; no values read (empty mask?)**
*Command:* mrcalc _crudenonwm.mif safe_sdm.mif -subtract 0 -if - | mrthreshold - - -mask _crudenonwm.mif | mrcalc _crudenonwm.mif - 0 -if crude_csf.mif -datatype bit
dwi2response:
dwi2response: **[ERROR] Command failed: mrcalc _crudenonwm.mif safe_sdm.mif -subtract 0 -if - | mrthreshold - - -mask _crudenonwm.mif | mrcalc _crudenonwm.mif - 0 -if crude_csf.mif -datatype bit** *(dhollander.py:105)*
dwi2response: *Output of failed command:*
mrcalc: [ERROR] not enough operands in stack for operation "if"
mrthreshold: [ERROR] no filename supplied to standard input (broken pipe?)
mrthreshold: [ERROR] error opening image "-"
mrcalc: [ERROR] error converting string "-"
dwi2response: *Changing back to original directory (/home/rkumar/hcp_sc)*
dwi2response: Script failed while executing the command: mrcalc _crudenonwm.mif safe_sdm.mif -subtract 0 -if - | mrthreshold - - -mask _crudenonwm.mif | mrcalc _crudenonwm.mif - 0 -if crude_csf.mif -datatype bit
dwi2response: For debugging, inspect contents of temporary directory: /home/rkumar/hcp_sc/dwi2response-tmp-3O5Z07/
The command I used for the dhollander algorithm was:
dwi2response dhollander 102513_DWI.mif 102513_RF_WM_freesurfer.txt 102513_RF_GM_freesurfer.txt 102513_RF_CSF_freesurfer.txt
It would be great if someone could tell me where I’m going wrong
Also I just wanted to add that the version of mrtrix I am using is 3.0 release candidate 2. I’m not sure if that has anything to do with my issue but I just wanted to put that out there.
Thanks for all your help in advance!