-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
this template is a group average and better suited for template-based segmentation of new datasets instead of the ex vivo MBMv2. Note: hipp segmentation might need some additional tweaks..
- Loading branch information
Showing
22 changed files
with
171 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
|
||
configfile: "config.yml" | ||
|
||
|
||
rule all: | ||
input: | ||
coords=expand( | ||
"tpl-{template}_dir-{dir}_hemi-{hemi}_space-corobl_label-{label}_desc-laplace_coords.nii.gz", | ||
template=config["template"], | ||
dir=["AP", "PD", "IO"], | ||
hemi="R", | ||
label=["hipp", "dentate"], | ||
), | ||
|
||
|
||
ruleorder: laplace_dentate_AP > laplace_coords | ||
|
||
|
||
rule laplace_coords: | ||
input: | ||
lbl=lambda wildcards: config["laplace_labels"][wildcards.label][wildcards.dir][ | ||
"img" | ||
].format(**wildcards), | ||
params: | ||
gm_labels=lambda wildcards: config["laplace_labels"][wildcards.label][ | ||
wildcards.dir | ||
]["gm"], | ||
src_labels=lambda wildcards: config["laplace_labels"][wildcards.label][ | ||
wildcards.dir | ||
]["src"], | ||
sink_labels=lambda wildcards: config["laplace_labels"][wildcards.label][ | ||
wildcards.dir | ||
]["sink"], | ||
convergence_threshold=1e-5, | ||
max_iters=10000, | ||
output: | ||
coords="tpl-{template}_dir-{dir}_hemi-{hemi}_space-corobl_label-{label}_desc-laplace_coords.nii.gz", | ||
log: | ||
"logs/tpl-{template}_dir-{dir}_hemi-{hemi}_space-corobl_label-{label}_desc-laplace_coords.txt", | ||
script: | ||
"../../workflow/scripts/laplace_coords.py" | ||
|
||
|
||
rule laplace_dentate_AP: | ||
""" we just mask this from the hipp label""" | ||
input: | ||
lbl=lambda wildcards: config["laplace_labels"][wildcards.label][wildcards.dir][ | ||
"img" | ||
].format(**wildcards), | ||
coords="tpl-{template}_dir-AP_hemi-{hemi}_space-corobl_label-hipp_desc-laplace_coords.nii.gz", | ||
params: | ||
gm_labels=lambda wildcards: config["laplace_labels"][wildcards.label][ | ||
wildcards.dir | ||
]["gm"], | ||
output: | ||
coords="tpl-{template}_dir-{dir,AP}_hemi-{hemi}_space-corobl_label-{label,dentate}_desc-laplace_coords.nii.gz", | ||
shell: | ||
"c3d {input.lbl} -retain-labels {params.gm_labels} -binarize {input.coords} -multiply -o {output.coords}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
template: MBMv3 | ||
|
||
laplace_labels: | ||
hipp: | ||
AP: | ||
img: 'tpl-{template}_hemi-{hemi}_space-corobl_desc-tissue_dseg.nii.gz' | ||
gm: | ||
- 1 | ||
- 8 | ||
src: | ||
- 5 | ||
sink: | ||
- 6 | ||
PD: | ||
img: 'tpl-{template}_hemi-{hemi}_space-corobl_desc-tissue_dseg.nii.gz' | ||
gm: | ||
- 1 | ||
- 8 | ||
src: | ||
- 3 | ||
sink: | ||
- 8 | ||
IO: | ||
img: 'tpl-{template}_hemi-{hemi}_space-corobl_desc-tissue_dseg.nii.gz' | ||
gm: | ||
- 1 | ||
- 8 | ||
src: | ||
- 2 | ||
- 4 | ||
- 7 | ||
sink: | ||
- 0 | ||
dentate: | ||
AP: | ||
img: 'tpl-{template}_hemi-{hemi}_space-corobl_desc-tissue_dseg.nii.gz' | ||
gm: | ||
- 8 | ||
src: | ||
- 5 | ||
sink: | ||
- 6 | ||
PD: | ||
img: 'tpl-{template}_hemi-{hemi}_space-corobl_desc-tissueDG_dseg.nii.gz' | ||
gm: | ||
- 8 | ||
src: | ||
- 1 | ||
sink: | ||
- 2 | ||
IO: | ||
img: 'tpl-{template}_hemi-{hemi}_space-corobl_desc-tissue_dseg.nii.gz' | ||
gm: | ||
- 8 | ||
src: | ||
- 1 | ||
sink: | ||
- 2 | ||
- 4 | ||
- 7 | ||
- 0 | ||
|
||
|
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+134 KB
...s/tpl-MBMv3/tpl-MBMv3_dir-AP_hemi-R_space-corobl_label-dentate_desc-laplace_coords.nii.gz
Binary file not shown.
Binary file added
BIN
+422 KB
...rces/tpl-MBMv3/tpl-MBMv3_dir-AP_hemi-R_space-corobl_label-hipp_desc-laplace_coords.nii.gz
Binary file not shown.
Binary file added
BIN
+109 KB
...s/tpl-MBMv3/tpl-MBMv3_dir-IO_hemi-R_space-corobl_label-dentate_desc-laplace_coords.nii.gz
Binary file not shown.
Binary file added
BIN
+439 KB
...rces/tpl-MBMv3/tpl-MBMv3_dir-IO_hemi-R_space-corobl_label-hipp_desc-laplace_coords.nii.gz
Binary file not shown.
Binary file added
BIN
+423 KB
...s/tpl-MBMv3/tpl-MBMv3_dir-PD_hemi-R_space-corobl_label-dentate_desc-laplace_coords.nii.gz
Binary file not shown.
Binary file added
BIN
+375 KB
...rces/tpl-MBMv3/tpl-MBMv3_dir-PD_hemi-R_space-corobl_label-hipp_desc-laplace_coords.nii.gz
Binary file not shown.
5 changes: 5 additions & 0 deletions
5
hippunfold/resources/tpl-MBMv3/tpl-MBMv3_from-native_to-corobl_type-itk_affine.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#Insight Transform File V1.0 | ||
#Transform 0 | ||
Transform: MatrixOffsetTransformBase_double_3_3 | ||
Parameters: 0.967355 -0.004634807426139079 -0.000258298981039498 -0.00140371 0.517115683952737 -0.8054876155601979 -0.0102109 0.7566899552250975 0.5498342828466409 0.06143197478192646 -8.855894869646765 5.349429146692667 | ||
FixedParameters: 0 0 0 |
Binary file added
BIN
+30.1 MB
hippunfold/resources/tpl-MBMv3/tpl-MBMv3_hemi-L_space-corobl_T1w.nii.gz
Binary file not shown.
Binary file added
BIN
+30 MB
hippunfold/resources/tpl-MBMv3/tpl-MBMv3_hemi-L_space-corobl_T2w.nii.gz
Binary file not shown.
Binary file added
BIN
+25.8 KB
hippunfold/resources/tpl-MBMv3/tpl-MBMv3_hemi-L_space-corobl_desc-tissueDG_dseg.nii.gz
Binary file not shown.
Binary file added
BIN
+77.4 KB
hippunfold/resources/tpl-MBMv3/tpl-MBMv3_hemi-L_space-corobl_desc-tissue_dseg.nii.gz
Binary file not shown.
Binary file added
BIN
+30.1 MB
hippunfold/resources/tpl-MBMv3/tpl-MBMv3_hemi-R_space-corobl_T1w.nii.gz
Binary file not shown.
Binary file added
BIN
+30 MB
hippunfold/resources/tpl-MBMv3/tpl-MBMv3_hemi-R_space-corobl_T2w.nii.gz
Binary file not shown.
Binary file added
BIN
+42.9 KB
hippunfold/resources/tpl-MBMv3/tpl-MBMv3_hemi-R_space-corobl_desc-tissueDG_dseg.nii.gz
Binary file not shown.
Binary file added
BIN
+27.2 KB
hippunfold/resources/tpl-MBMv3/tpl-MBMv3_hemi-R_space-corobl_desc-tissueDGfixed_dseg.nii.gz
Binary file not shown.
Binary file added
BIN
+61.4 KB
hippunfold/resources/tpl-MBMv3/tpl-MBMv3_hemi-R_space-corobl_desc-tissue_dseg.nii.gz
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters