help > RE: Using New template in CONN toolbox for segmentation and normalization steps
Aug 29, 2025  06:08 PM | Alfonso Nieto-Castanon - Boston University
RE: Using New template in CONN toolbox for segmentation and normalization steps

Hi Mohammad,


Yes, your approach looks perfectly fine, the only concern is that your template is likely not a "Tissue Probability Map" (a map indicating the probabilities at each voxel of different tissue classes, like gray matter, white matter, CSF, etc.) but probably a reference T1 image instead. In that case you should not use SPM's modern normalization method (the one used since SPM12) but instead revert to the "old normalization" method in SPM (the one used in SPM8) which used an anatomical image as a reference template. You may do that, for example, by adding the following line to your conn_setup_preproc command:


 'usespm8methods', true, ...


And regarding your specific questions: (1) yes, you should manually remove those steps (and also smoothing) from the pipeline when running preprocessing, and then, after that finishes, run your command to complete the alternative normalization procedure, probably then followed by running the missing smoothing step alone on your functional data; and (2) yes, your are right the contours in the QA plots will still be using the standard template gray/white/CSF boundaries for display even if normalization actually used a different template (sorry about that)


Hope this helps


Alfonso


Originally posted by Mohammad Javad Mousavi:





Hi All,




I'm working on preprocessing an fMRI dataset, and I’m generally following the default preprocessing pipeline offered by CONN. Here are the exact steps I plan to use:




- `functional Label current functional files as "original functional data"`

- `functional Center to (0,0,0) coordinates (translation) separately for each run/session`

- `functional Realignment with correction of susceptibility distortion interactions (subject motion estimation and correction)`

- `functional Label current functional files as "realigned functional data"`

- `functional Slice timing correction (STC; correction for inter-slice differences in acquisition time)`

- `functional Outlier detection (ART-based identification of outlier scans for scrubbing)`

- `functional Direct segmentation and MNI-space normalization (simultaneous Grey/White/CSF segmentation and MNI normalization)`

- `functional Label current functional files as "mni-space functional data"`

- `structural Label current structural files as "original structural images"`

- `structural Center to (0,0,0) coordinates (translation)`

- `structural Segmentation and normalization (simultaneous Grey/White/CSF segmentation and MNI normalization)`

- `structural Label current structural files as "mni-space structural images"`

- `functional Smoothing (spatial convolution with Gaussian kernel)`

- `functional Label current functional files as "smoothed functional data"`




However, due to the nature of my sample, I would like to use a **custom brain template** for the segmentation and normalization steps:




> **Template file:** `DLBS268MNI_111_brain.nii`  

> This is an adult lifespan sample brain template in MNI space.




To do this, my plan is to complete most preprocessing steps through the GUI, but perform **segmentation and normalization manually using the following script**:




```matlab

conn_setup_preproc( ...

 {'structural_segment&normalize'}, ...

 'applytofunctional', true, ...

 'structural_template', 'F:/ds004856-download/dlbs_templates/DLBS268MNI_brain/DLBS268MNI_111_brain.nii');

```




---




### My questions:




**1.** Is this a valid approach for replacing the default segmentation and normalization steps with a custom template?  

If yes, should I **manually remove** the following four steps from the GUI pipeline?




- `functional Direct segmentation and MNI-space normalization`

- `functional Label current functional files as "mni-space functional data"`

- `structural Segmentation and normalization`

- `structural Label current structural files as "mni-space structural images"`




**2.** Assuming everything is done correctly, in the **QA normalization** step, will CONN display the result using **my custom DLBS template**, or does it still overlay the outline of the **default MNI TPM** template regardless of what was used during normalization?




Thank you very much for your help,  

Mohammad Javad



 

Threaded View

TitleAuthorDate
Mohammad Javad Mousavi Aug 8, 2025
RE: Using New template in CONN toolbox for segmentation and normalization steps
Alfonso Nieto-Castanon Aug 29, 2025