diff --git a/.github/workflows/python-testing.yml b/.github/workflows/python-testing.yml index 18c1f926..c21f96c4 100644 --- a/.github/workflows/python-testing.yml +++ b/.github/workflows/python-testing.yml @@ -164,6 +164,13 @@ jobs: - name: Test modality T1w with myelin map run: | poetry run hippunfold test_data/bids_singleT2w test_out participant -np --modality T1w --generate-myelin-map + - name: Test modality T1w with magdeburg atlas + run: | + poetry run hippunfold test_data/bids_T1w test_out participant -np --modality T1w --atlas magdeburg + - name: Test modality T1w with freesurfer atlas + run: | + poetry run hippunfold test_data/bids_T1w test_out participant -np --modality T1w --atlas freesurfer + diff --git a/hippunfold/config/snakebids.yml b/hippunfold/config/snakebids.yml index 8cea10ac..60864191 100644 --- a/hippunfold/config/snakebids.yml +++ b/hippunfold/config/snakebids.yml @@ -191,6 +191,7 @@ parse_args: choices: - 'bigbrain' - 'magdeburg' + - 'freesurfer' default: 'bigbrain' help: 'Select the atlas (unfolded space) to use for subfield labels. (default: %(default)s)' @@ -334,6 +335,9 @@ atlas_files: magdeburg: label_nii: resources/magdeburg/sub-all_hemi-{hemi}_label-hipp_desc-manualsubfields_maxprob.nii.gz label_list: resources/magdeburg/magdeburg_labellist.txt + freesurfer: + label_nii: resources/freesurfer/sub-all_hemi-{hemi}_space-unfold_label-hipp_desc-freesurfersubfields_dseg.nii.gz + label_list: resources/freesurfer/freesurfer_labellist.txt rigid_reg_template: False diff --git a/hippunfold/resources/freesurfer/README.md b/hippunfold/resources/freesurfer/README.md new file mode 100644 index 00000000..c14a3e9e --- /dev/null +++ b/hippunfold/resources/freesurfer/README.md @@ -0,0 +1,6 @@ +Freesurfer subfield atlas + +Generated using workflow from https://github.com/khanlab/hippunfold-create-atlas#freesurfer +This creates probalistic and maxprob (used here) labels by running hippunfold & freesurfer subfield segmentation on ds002168 (openneuro, 48 subjects) and mapping the freesurfer labels to the unfolded space. + + diff --git a/hippunfold/resources/freesurfer/freesurfer_labellist.txt b/hippunfold/resources/freesurfer/freesurfer_labellist.txt new file mode 100644 index 00000000..9892045a --- /dev/null +++ b/hippunfold/resources/freesurfer/freesurfer_labellist.txt @@ -0,0 +1,88 @@ +alveus +201 255 204 153 255 +perforant_pathway +202 255 128 128 255 +parasubiculum +203 175 175 75 255 +presubiculum +204 64 0 64 255 +subiculum +205 0 0 255 255 +CA1 +206 255 0 0 255 +CA2 +207 128 128 255 255 +CA3 +208 0 128 0 255 +CA4 +209 196 160 128 255 +GC-DG +210 32 200 255 255 +HATA +211 128 255 128 255 +fimbria +212 204 153 204 255 +lateral_ventricle +213 121 17 136 255 +molecular_layer_HP +214 128 0 0 255 +hippocampal_fissure +215 128 32 255 255 +entorhinal_cortex +216 255 204 102 255 +molecular_layer_subiculum +217 128 128 128 255 +Amygdala +218 104 255 255 255 +Cerebral_White_Matter +219 0 226 0 255 +Cerebral_Cortex +220 205 63 78 255 +Inf_Lat_Vent +221 197 58 250 255 +Perirhinal +222 33 150 250 255 +Cerebral_White_Matter_Edge +223 226 0 0 255 +Background +224 100 100 100 255 +Ectorhinal +225 197 150 250 255 +HP_tail +226 170 170 255 255 +Polymorphic-Layer +227 128 255 128 255 +Intracellular-Space +228 204 153 204 255 +HP_body +231 0 255 0 255 +HP_head +232 255 0 0 255 +presubiculum-head +233 32 0 32 255 +presubiculum-body +234 64 0 64 255 +subiculum-head +235 0 0 175 255 +subiculum-body +236 0 0 255 255 +CA1-head +237 175 75 75 255 +CA1-body +238 255 0 0 255 +CA3-head +239 0 80 0 255 +CA3-body +240 0 128 0 255 +CA4-head +241 120 90 50 255 +CA4-body +242 196 160 128 255 +GC-ML-DG-head +243 75 125 175 255 +GC-ML-DG-body +244 32 200 255 255 +molecular_layer_HP-head +245 100 25 25 255 +molecular_layer_HP-body +246 128 0 0 255 diff --git a/hippunfold/resources/freesurfer/maxprob_labellist.txt b/hippunfold/resources/freesurfer/maxprob_labellist.txt new file mode 100644 index 00000000..72f0a842 --- /dev/null +++ b/hippunfold/resources/freesurfer/maxprob_labellist.txt @@ -0,0 +1,88 @@ +alveus +1 255 204 153 255 +perforant_pathway +2 255 128 128 255 +parasubiculum +3 175 175 75 255 +presubiculum +4 64 0 64 255 +subiculum +5 0 0 255 255 +CA1 +6 255 0 0 255 +CA2 +7 128 128 255 255 +CA3 +8 0 128 0 255 +CA4 +9 196 160 128 255 +GC-DG +10 32 200 255 255 +HATA +11 128 255 128 255 +fimbria +12 204 153 204 255 +lateral_ventricle +13 121 17 136 255 +molecular_layer_HP +14 128 0 0 255 +hippocampal_fissure +15 128 32 255 255 +entorhinal_cortex +16 255 204 102 255 +molecular_layer_subiculum +17 128 128 128 255 +Amygdala +18 104 255 255 255 +Cerebral_White_Matter +19 0 226 0 255 +Cerebral_Cortex +20 205 63 78 255 +Inf_Lat_Vent +21 197 58 250 255 +Perirhinal +22 33 150 250 255 +Cerebral_White_Matter_Edge +23 226 0 0 255 +Background +24 100 100 100 255 +Ectorhinal +25 197 150 250 255 +HP_tail +26 170 170 255 255 +Polymorphic-Layer +27 128 255 128 255 +Intracellular-Space +28 204 153 204 255 +HP_body +29 0 255 0 255 +HP_head +30 255 0 0 255 +presubiculum-head +31 32 0 32 255 +presubiculum-body +32 64 0 64 255 +subiculum-head +33 0 0 175 255 +subiculum-body +34 0 0 255 255 +CA1-head +35 175 75 75 255 +CA1-body +36 255 0 0 255 +CA3-head +37 0 80 0 255 +CA3-body +38 0 128 0 255 +CA4-head +39 120 90 50 255 +CA4-body +40 196 160 128 255 +GC-ML-DG-head +41 75 125 175 255 +GC-ML-DG-body +42 32 200 255 255 +molecular_layer_HP-head +43 100 25 25 255 +molecular_layer_HP-body +44 128 0 0 255 diff --git a/hippunfold/resources/freesurfer/sub-all_hemi-L_space-unfold_label-hipp_desc-freesurfersubfields_dseg.nii.gz b/hippunfold/resources/freesurfer/sub-all_hemi-L_space-unfold_label-hipp_desc-freesurfersubfields_dseg.nii.gz new file mode 100644 index 00000000..cc948c0c Binary files /dev/null and b/hippunfold/resources/freesurfer/sub-all_hemi-L_space-unfold_label-hipp_desc-freesurfersubfields_dseg.nii.gz differ diff --git a/hippunfold/resources/freesurfer/sub-all_hemi-R_space-unfold_label-hipp_desc-freesurfersubfields_dseg.nii.gz b/hippunfold/resources/freesurfer/sub-all_hemi-R_space-unfold_label-hipp_desc-freesurfersubfields_dseg.nii.gz new file mode 100644 index 00000000..e6eb8355 Binary files /dev/null and b/hippunfold/resources/freesurfer/sub-all_hemi-R_space-unfold_label-hipp_desc-freesurfersubfields_dseg.nii.gz differ