help
help > RE: Pediatric Template
Aug 15, 2015 04:08 AM | Alfonso Nieto-Castanon - Boston University
RE: Pediatric Template
Hi John,
Yes, definitely. There are only a couple of subtleties to consider when using alternative tissue probability maps in SPM12:
a) in SPM12 the tissue probability maps should be entered as a single 4d-file and explicitly add-up to one (in SPM8 the "new segment" procedure also accepted tissue probabiity maps but they were defined there only for grey/white/csf areas and SPM would implicitly consider a fourth tissue class corresponding to any other tissue type), so if you have grey/white/CSF tissue probability maps and you want to use these in SPM12 you should create an additional "other" probability map with probability values 1-p1-p2-p3 (assuming your original files are scaled between 0 to 1 representing tissue-class probabilities) and merge all four classes into a single map. You can do this, for example, using the following commands:
spm_imcalc({'grey.nii','white.nii','csf.nii'},'other.nii','max(0,1-i1-i2-i3)');
spm_file_merge({'grey.nii','white.nii','csf.nii','other.nii'},'TPM.nii');
b) when using segmentation with non-default tissue probability maps you need to specify the number of gaussians associated with each tissue class. The recommended values for a grey/white/CSF template are [2 2 2 4] (respectively for grey/white/CSF/other) but you may want to play with these values if you are using a new template to find what works best
In terms of how to use these alternative tissue probability maps in CONN, you could use the 'interactive SPM batch editor' option in 'structural tools' and 'functional tools' to manually edit the default values in the normalization/segmentation steps but that is probably a bit cumbersome, so I am attaching a patch (this patch is for version 15e, copy it into the CONN distribution folder overwriting the file with the same name there) that allows you to use alternative tissue probability maps using a similar syntax as I was using in the previous-post examples. In particular, if you want to use the indirect normalization pipeline you could load your raw functional/structural data in CONN and then simply run:
conn_setup_preproc({'functional_realign&unwarp', 'functional_slicetime', 'functional_coregister', 'structural_segment&normalize', 'functional_art', 'functional_smooth'}, 'applytofunctional', true, 'tpm_template', 'TPM.nii', 'tpm_ngaus', [2 2 2 4]);
This will run all preprocessing steps (including the normalization using the new tissue probability maps). If you prefer to use the direct normalization pipeline simply run instead:
conn_setup_preproc({'functional_realign&unwarp', 'functional_slicetime', 'structural_segment&normalize', 'functional_normalize', 'functional_art', 'functional_smooth'}, 'tpm_template', 'TPM.nii', 'tpm_ngaus', [2 2 2 4]);
Let me know if you run into any issues and/or if you would like me to clarify any of the above.
Hope this helps
Alfonso
Originally posted by John Hutton:
Yes, definitely. There are only a couple of subtleties to consider when using alternative tissue probability maps in SPM12:
a) in SPM12 the tissue probability maps should be entered as a single 4d-file and explicitly add-up to one (in SPM8 the "new segment" procedure also accepted tissue probabiity maps but they were defined there only for grey/white/csf areas and SPM would implicitly consider a fourth tissue class corresponding to any other tissue type), so if you have grey/white/CSF tissue probability maps and you want to use these in SPM12 you should create an additional "other" probability map with probability values 1-p1-p2-p3 (assuming your original files are scaled between 0 to 1 representing tissue-class probabilities) and merge all four classes into a single map. You can do this, for example, using the following commands:
spm_imcalc({'grey.nii','white.nii','csf.nii'},'other.nii','max(0,1-i1-i2-i3)');
spm_file_merge({'grey.nii','white.nii','csf.nii','other.nii'},'TPM.nii');
b) when using segmentation with non-default tissue probability maps you need to specify the number of gaussians associated with each tissue class. The recommended values for a grey/white/CSF template are [2 2 2 4] (respectively for grey/white/CSF/other) but you may want to play with these values if you are using a new template to find what works best
In terms of how to use these alternative tissue probability maps in CONN, you could use the 'interactive SPM batch editor' option in 'structural tools' and 'functional tools' to manually edit the default values in the normalization/segmentation steps but that is probably a bit cumbersome, so I am attaching a patch (this patch is for version 15e, copy it into the CONN distribution folder overwriting the file with the same name there) that allows you to use alternative tissue probability maps using a similar syntax as I was using in the previous-post examples. In particular, if you want to use the indirect normalization pipeline you could load your raw functional/structural data in CONN and then simply run:
conn_setup_preproc({'functional_realign&unwarp', 'functional_slicetime', 'functional_coregister', 'structural_segment&normalize', 'functional_art', 'functional_smooth'}, 'applytofunctional', true, 'tpm_template', 'TPM.nii', 'tpm_ngaus', [2 2 2 4]);
This will run all preprocessing steps (including the normalization using the new tissue probability maps). If you prefer to use the direct normalization pipeline simply run instead:
conn_setup_preproc({'functional_realign&unwarp', 'functional_slicetime', 'structural_segment&normalize', 'functional_normalize', 'functional_art', 'functional_smooth'}, 'tpm_template', 'TPM.nii', 'tpm_ngaus', [2 2 2 4]);
Let me know if you run into any issues and/or if you would like me to clarify any of the above.
Hope this helps
Alfonso
Originally posted by John Hutton:
Thank you very much, Alfonso. The good
news, perhaps, is that I actually have gray/white/CSF pediatric
tissue probability maps, as well as a pediatric T1 template.
Can I use these maps in CONN/SPM12, so that I don't need to switch
to SPM8?
Thank you and apologies for the novice-level questions!
Best,
John
Thank you and apologies for the novice-level questions!
Best,
John
Threaded View
| Title | Author | Date |
|---|---|---|
| John Hutton | Aug 13, 2015 | |
| Alfonso Nieto-Castanon | Aug 14, 2015 | |
| Jules Dugre | Jul 23, 2020 | |
| John Hutton | Aug 14, 2015 | |
| Alfonso Nieto-Castanon | Aug 15, 2015 | |
| Paulo Branco | Oct 26, 2018 | |
