-
Notifications
You must be signed in to change notification settings - Fork 0
/
cbu2bids_nodeface
executable file
·34 lines (31 loc) · 1.03 KB
/
cbu2bids_nodeface
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
#
# CBU wrapper for dcm2bids. Takes care of adding code to path and setting the
# correct python / PYTHONPATH. This variant omits de-facing of the structural
# images - be sure that this is what you want.
#
# 2018-10-18 J Carlin
export PATH=/imaging/local/software/dcm2niix/bin:$PATH
export PATH=/imaging/local/software/fsl/fsl64/fsl-5.0.3/fsl/bin/:$PATH
export PATH=/imaging/local/software/anaconda/2.4.1/2/envs/heudiconv/bin/:$PATH
export PATH=/imaging/local/software/dcm2bids/scripts:$PATH
export PYTHONPATH=/imaging/local/software/dcm2bids
export FSLOUTPUTTYPE=NIFTI_GZ
# need to make sure outputdir is set to avoid attempts to write to script dir
# (which will be cwd in dcm2bids below)
validcheck=0
for var in "$@"
do
if [[ $var == -o ]]; then
validcheck=1
fi
if [[ $var == --outputdir ]]; then
validcheck=1
fi
done
if [ $validcheck == 0 ]; then
echo "ERROR: must specify outputdir by setting -o or --outputdir flag"
exit 1
fi
# bash voodoo for pass any and all input arguments on
dcm2bids "$@"