Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-science
analysis
C-MORE brain MRI
Commits
582227e7
Commit
582227e7
authored
Jun 16, 2021
by
Christoph Arthofer
Browse files
Upload New File
parent
f3dfbd43
Changes
1
Hide whitespace changes
Inline
Side-by-side
OB_pipeline/cmore_FLIRT_registration.sh
0 → 100644
View file @
582227e7
#!/bin/bash
# Author: Christoph Arthofer
# Copyright: FMRIB 2021
#$ -cwd -j y
#$ -r y
echo
`
date
`
: Executing task
${
SGE_TASK_ID
}
of job
${
JOB_ID
}
on
`
hostname
`
as user
${
USER
}
echo
SGE_TASK_FIRST
=
${
SGE_TASK_FIRST
}
,
SGE_TASK_LAST
=
${
SGE_TASK_LAST
}
,
SGE_TASK_STEPSIZE
=
${
SGE_TASK_STEPSIZE
}
.
~/.bash_profile
.
$MODULESHOME
/init/bash
module load fsl/6.0.3
ID_PATH
=
$1
DATA_DIR
=
$2
TEMP_DIR
=
$3
OUT_DIR
=
$4
IMG_IN_ID
=
$(
awk
'NR=='
${
SGE_TASK_ID
}
${
ID_PATH
}
)
IMG_IN_PATH
=
"
${
DATA_DIR
}${
IMG_IN_ID
}
/T1/T1_unbiased_brain.nii.gz"
IMG_REF_PATH
=
"
${
TEMP_DIR
}
T1_template_brain.nii.gz"
T1_OMAT_OUT_PATH
=
"
${
OUT_DIR
}${
IMG_IN_ID
}
_to_template_T1reg.mat"
echo
"flirt -in
${
IMG_IN_PATH
}
-ref
${
IMG_REF_PATH
}
-omat
${
T1_OMAT_OUT_PATH
}
-dof 12"
flirt
-in
${
IMG_IN_PATH
}
-ref
${
IMG_REF_PATH
}
-omat
${
T1_OMAT_OUT_PATH
}
-dof
12
IMG_IN_PATH
=
"
${
DATA_DIR
}${
IMG_IN_ID
}
/T2_FLAIR/T2_FLAIR_unbiased_brain.nii.gz"
IMG_REF_PATH
=
"
${
DATA_DIR
}${
IMG_IN_ID
}
/T1/T1_unbiased_brain.nii.gz"
T2_to_T1_OMAT_OUT_PATH
=
"
${
OUT_DIR
}${
IMG_IN_ID
}
_T2_to_T1.mat"
echo
"flirt -in
${
IMG_IN_PATH
}
-ref
${
IMG_REF_PATH
}
-omat
${
T2_to_T1_OMAT_OUT_PATH
}
-dof 6"
flirt
-in
${
IMG_IN_PATH
}
-ref
${
IMG_REF_PATH
}
-omat
${
T2_to_T1_OMAT_OUT_PATH
}
-dof
6
T2_OMAT_OUT_PATH
=
"
${
OUT_DIR
}${
IMG_IN_ID
}
_to_template_T2reg.mat"
echo
"convert_xfm -omat
${
T2_OMAT_OUT_PATH
}
-concat
${
T1_OMAT_OUT_PATH
}
${
T2_to_T1_OMAT_OUT_PATH
}
"
convert_xfm
-omat
${
T2_OMAT_OUT_PATH
}
-concat
${
T1_OMAT_OUT_PATH
}
${
T2_to_T1_OMAT_OUT_PATH
}
rv
=
$?
echo
`
date
`
: task
complete
exit
$rv
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment