Skip to content
By Elizabeth Horwath · Last updated 2026-03-17

T1/T2

The T1T2 pipeline generates the ratio of T1-weighted to T2-weighted signal intensity (T1/T2). The T2 sequence can be specified as a T2-weighted or FLAIR (default) image.

Usage

The pipeline contains two stages: 1) Estimation: calculates each participants' T1/T2 ratio and 2) Consolidation: consolidates all participants' results into a single .csv file.

This pipeline can be run with or without a container. For containerized usage, Singularity can be used on a cluster or Docker locally. This pipeline can be run in individual or batch mode, meaning you can specify a certain subject and session or run the pipeline for all subjects in the folder, respectively.

These examples will run the pipeline in batch mode on the cluster. To run individually or locally/with a container, set --mode individual, or -c local/-c singularity/-c docker, respectively.


Step 1. Estimation

This step processes T1 and T2 or T2-FLAIR (default) images to estimate the T1/T2 ratio. By default, it extracts lesion volumes and generation of T1/T2 ratio. This is different from most other pipelines that run all preprocessing steps by default. Bias correction, skullstripping, registration to FLAIR or T2 space, WhiteStripe normalization can be turned on if required.


Required flags:

-m or --mainpath: path to parent data folder
--t1: T1 sequence name
--t2: T2 sequence name
OR
-f or --flair: FLAIR sequence name
--toolpath: path to pipeline folder

Other flags:

-p or --participant: participant ID (only needed for individual mode)
--ses: session ID (only needed for individual mode)
-n or --n4: run N4 bias correction. Default is FALSE
-s or --skullstripping: run skullstripping. Default is FALSE
-r or --registration: run registration. Default is FALSE
-w or --whitestripe: run WhiteStripe normalization. Default is FALSE
-l or --lesion: extract lesion volumes. Default is TRUE
--t2type: T2 sequence for generating T1/T2 ratio - t2, flair. Default is flair
--masktype: segmentation for generating ROI T1/T2 - fast, jlf, freesurfer. Default is freesurfer
--step: step of pipeline - estimation, consolidation. Default is estimation
--mode: run pipeline individually or batch. Default is batch
-c or --container: which container to use: singularity, docker, local, cluster. Default is cluster
--sinpath: path to singularity image (only needed if using singularity container - don't need to specify if using takim cluster)
--dockerpath: path to docker image (only needed if using docker container)
-h or --help: show help message

bash /path/to/PennSIVE_neuro_pip/pipelines/t1t2/code/bash/t1t2.sh -m /path/to/project --t1 "*T1w.nii.gz" -f "*FLAIR.nii.gz" --toolpath /path/to/PennSIVE_neuro_pip


Step 2. Consolidation

This step consolidates the T1/T2 ratios for all participants and sessions.


Required flags:

-m or --mainpath: path to parent data folder
--step: step of pipeline - estimation, consolidation. Default is estimation. This step is consolidation
--toolpath: path to pipeline folder

Other flags:

--t2type: T2 sequence for generating T1/T2 ratio - t2, flair. Default is flair
--masktype: segmentation for generating ROI T1/T2 - fast, jlf, freesurfer. Default is freesurfer
-c or --container: which container to use: singularity, docker, local, cluster. Default is cluster
--sinpath: path to singularity image (only needed if using singularity container - don't need to specify if using takim cluster)
--dockerpath: path to docker image (only needed if using docker container)
-h or --help: show help message

bash /path/to/PennSIVE_neuro_pip/pipelines/t1t2/code/bash/t1t2.sh -m /path/to/project --step consolidation --toolpath /path/to/PennSIVE_neuro_pip