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
Christoph Arthofer
ms_templates
Commits
5532b5c6
Commit
5532b5c6
authored
Jul 23, 2021
by
Christoph Arthofer
Browse files
inverse mask creation, intensity normalisation=False, delete all temporary files when clamping
parent
4d65e120
Changes
3
Show whitespace changes
Inline
Side-by-side
run_template_construction.py
View file @
5532b5c6
...
...
@@ -852,6 +852,7 @@ if __name__ == "__main__":
kwargs
=
None
,
clean
=
"never"
)
jobcmd
=
jobcmd
+
'
\n
'
jobcmd
=
jobcmd
+
'fslmaths '
+
tree
.
get
(
'data/lesion_mask_in_T1'
)
+
' -bin '
+
tree
.
get
(
'inverse_lesion_mask_in_T1'
)
+
'
\n
'
f
.
write
(
jobcmd
)
# job_ids[0] = submitJob(tag+'_'+task_name, log_dir, script=script_path, queue=cpuq)
job_ids
[
0
]
=
submitJob
(
script_path
,
tag
+
'_'
+
task_name
,
log_dir
,
queue
=
cpuq
,
wait_for
=
None
,
array_task
=
True
)
...
...
@@ -996,7 +997,7 @@ if __name__ == "__main__":
img_paths
.
append
(
tree
.
get
(
'T1_to_unbiased_img'
))
aff_template_path
=
tree
.
get
(
'T1_unbiased_affine_template'
)
jobcmd
=
func_to_cmd
(
averageImages
,
args
=
(
img_paths
,
aff_template_path
,
'median'
,
Tru
e
),
tmp_dir
=
script_dir
,
kwargs
=
None
,
jobcmd
=
func_to_cmd
(
averageImages
,
args
=
(
img_paths
,
aff_template_path
,
'median'
,
Fals
e
),
tmp_dir
=
script_dir
,
kwargs
=
None
,
clean
=
"never"
)
# job_ids[8] = submitJob(tag+'_'+task_name, log_dir, command=jobcmd, queue=cpuq, wait_for=[job_ids[5]])
job_ids
[
8
]
=
submitJob
(
jobcmd
,
tag
+
'_'
+
task_name
,
log_dir
,
queue
=
cpuq
,
wait_for
=
[
job_ids
[
5
]],
...
...
@@ -1188,7 +1189,7 @@ if __name__ == "__main__":
img_paths
.
append
(
tree
.
get
(
'T1_brain_to_MNI_img'
))
aff_template_path
=
tree
.
get
(
'T1_brain_affine_template'
)
jobcmd
=
func_to_cmd
(
averageImages
,
args
=
(
img_paths
,
aff_template_path
,
'median'
,
Tru
e
),
tmp_dir
=
script_dir
,
jobcmd
=
func_to_cmd
(
averageImages
,
args
=
(
img_paths
,
aff_template_path
,
'median'
,
Fals
e
),
tmp_dir
=
script_dir
,
kwargs
=
None
,
clean
=
"never"
)
# job_ids[21] = submitJob(tag+'_'+task_name, log_dir, command=jobcmd, queue=cpuq,
# wait_for=[job_ids[15]])
...
...
@@ -1231,7 +1232,7 @@ if __name__ == "__main__":
img_paths
.
append
(
tree
.
get
(
'T1_head_to_MNI_img'
))
aff_template_path
=
tree
.
get
(
'T1_head_affine_template'
)
jobcmd
=
func_to_cmd
(
averageImages
,
args
=
(
img_paths
,
aff_template_path
,
'median'
,
Tru
e
),
tmp_dir
=
script_dir
,
jobcmd
=
func_to_cmd
(
averageImages
,
args
=
(
img_paths
,
aff_template_path
,
'median'
,
Fals
e
),
tmp_dir
=
script_dir
,
kwargs
=
None
,
clean
=
"never"
)
# job_ids[24] = submitJob(tag+'_'+task_name, log_dir, command=jobcmd, queue=cpuq,
# wait_for=[job_ids[17]])
...
...
@@ -1249,7 +1250,7 @@ if __name__ == "__main__":
img_paths
.
append
(
tree
.
get
(
'T2_head_to_MNI_img'
))
aff_template_path
=
tree
.
get
(
'T2_head_affine_template'
)
jobcmd
=
func_to_cmd
(
averageImages
,
args
=
(
img_paths
,
aff_template_path
,
'median'
,
Tru
e
),
tmp_dir
=
script_dir
,
jobcmd
=
func_to_cmd
(
averageImages
,
args
=
(
img_paths
,
aff_template_path
,
'median'
,
Fals
e
),
tmp_dir
=
script_dir
,
kwargs
=
None
,
clean
=
"never"
)
# job_ids[25] = submitJob(tag+'_'+task_name, log_dir, command=jobcmd, queue=cpuq,
# wait_for=[job_ids[18]])
...
...
@@ -1267,7 +1268,7 @@ if __name__ == "__main__":
img_paths
.
append
(
tree
.
get
(
'DTI_to_MNI_img'
))
aff_template_path
=
tree
.
get
(
'DTI_affine_template'
)
jobcmd
=
func_to_cmd
(
averageImages
,
args
=
(
img_paths
,
aff_template_path
,
'median'
,
Tru
e
),
tmp_dir
=
script_dir
,
jobcmd
=
func_to_cmd
(
averageImages
,
args
=
(
img_paths
,
aff_template_path
,
'median'
,
Fals
e
),
tmp_dir
=
script_dir
,
kwargs
=
None
,
clean
=
"never"
)
# job_ids[26] = submitJob(tag+'_'+task_name, log_dir, command=jobcmd, queue=cpuq,
# wait_for=[job_ids[19]])
...
...
@@ -1377,7 +1378,7 @@ if __name__ == "__main__":
aff_ref_scalar
=
[
tree
.
get
(
'identity_mat'
)]
aff_mov_scalar
=
[
tree
.
get
(
'T1_to_MNI_mat'
)]
mask_ref_scalar
=
[
img_ref_T1brain_mask_path
]
mask_mov_scalar
=
[
tree
.
get
(
'data/lesion_mask_in_T1'
)]
mask_mov_scalar
=
[
tree
.
get
(
'data/
inverse_
lesion_mask_in_T1'
)]
img_ref_tensor
=
[]
img_mov_tensor
=
[]
aff_ref_tensor
=
[]
...
...
@@ -1710,7 +1711,7 @@ if __name__ == "__main__":
img_paths
.
append
(
tree
.
get
(
'warped_T1brain'
))
nln_template_path
=
tree
.
get
(
'T1_brain_nln_template'
)
jobcmd
=
func_to_cmd
(
averageImages
,
args
=
(
img_paths
,
nln_template_path
,
'median'
,
Tru
e
),
tmp_dir
=
script_dir
,
jobcmd
=
func_to_cmd
(
averageImages
,
args
=
(
img_paths
,
nln_template_path
,
'median'
,
Fals
e
),
tmp_dir
=
script_dir
,
kwargs
=
None
,
clean
=
"never"
)
# job_ids[44] = submitJob(tag+'_'+task_name, log_dir, command=jobcmd, queue=cpuq,
# wait_for=[job_ids[37]])
...
...
@@ -1728,7 +1729,7 @@ if __name__ == "__main__":
img_paths
.
append
(
tree
.
get
(
'warped_T1head'
))
nln_template_path
=
tree
.
get
(
'T1_head_nln_template'
)
jobcmd
=
func_to_cmd
(
averageImages
,
args
=
(
img_paths
,
nln_template_path
,
'median'
,
Tru
e
),
tmp_dir
=
script_dir
,
jobcmd
=
func_to_cmd
(
averageImages
,
args
=
(
img_paths
,
nln_template_path
,
'median'
,
Fals
e
),
tmp_dir
=
script_dir
,
kwargs
=
None
,
clean
=
"never"
)
# job_ids[45] = submitJob(tag+'_'+task_name, log_dir, command=jobcmd, queue=cpuq,
# wait_for=[job_ids[39]])
...
...
@@ -1746,7 +1747,7 @@ if __name__ == "__main__":
img_paths
.
append
(
tree
.
get
(
'warped_T2head'
))
nln_template_path
=
tree
.
get
(
'T2_head_nln_template'
)
jobcmd
=
func_to_cmd
(
averageImages
,
args
=
(
img_paths
,
nln_template_path
,
'median'
,
Tru
e
),
tmp_dir
=
script_dir
,
jobcmd
=
func_to_cmd
(
averageImages
,
args
=
(
img_paths
,
nln_template_path
,
'median'
,
Fals
e
),
tmp_dir
=
script_dir
,
kwargs
=
None
,
clean
=
"never"
)
# job_ids[46] = submitJob(tag+'_'+task_name, log_dir, command=jobcmd, queue=cpuq,
# wait_for=[job_ids[40]])
...
...
@@ -1764,7 +1765,7 @@ if __name__ == "__main__":
img_paths
.
append
(
tree
.
get
(
'warped_DTIscalar'
))
nln_template_path
=
tree
.
get
(
'DTI_nln_template'
)
jobcmd
=
func_to_cmd
(
averageImages
,
args
=
(
img_paths
,
nln_template_path
,
'median'
,
Tru
e
),
tmp_dir
=
script_dir
,
jobcmd
=
func_to_cmd
(
averageImages
,
args
=
(
img_paths
,
nln_template_path
,
'median'
,
Fals
e
),
tmp_dir
=
script_dir
,
kwargs
=
None
,
clean
=
"never"
)
# job_ids[47] = submitJob(tag+'_'+task_name, log_dir, command=jobcmd, queue=cpuq,
# wait_for=[job_ids[42]])
...
...
tempconfig/MS_template.tree
View file @
5532b5c6
...
...
@@ -8,11 +8,11 @@ ext_txt=.txt
!{template_dir}
misc (misc_dir)
ident{ext_mat} (identity_mat)
log (log_dir)
scripts (script_dir)
clamped_T1 (clamped_dir)
{sub_id}
{sub_id}_T1_clamped{ext_nii} (T1_head_clamped)
{sub_id}_T2Lesion_in_T1_inverse{ext_nii} (inverse_lesion_mask_in_T1)
log (log_dir)
scripts (script_dir)
affine_it1 (affine_it1_dir)
{sub_id} (affine_it1_subject_dir)
T1_to_{ref_id}{ext_mat} (T1_to_ref_mat)
...
...
tempconfig/data.tree
View file @
5532b5c6
Write
Preview
Markdown
is supported
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