You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of FAST, use SynthSeg segmentations for 5TT/GMWMI generation
Additional details
FAST isn't great, and we already have SynthSeg outputs from QSIPrep
Next steps
Here is the full pipeline for 5ttgen fsl, with added comments / variable names. Basically, take the below code and create a custome 5ttgen command, skipping steps and replacing segmentation maps as needed.
# Change image strides
mrconvert $INPUT_T1.NII.GZ $INPUT.MIF
mrconvert $INPUT.MIF $CONFORMED_T1.NII -strides -1,+2,+3
# Register to MNI (Can be skipped because qsiprep does this)
maskfilter /Applications/fsl/data/standard/MNI152_T1_1mm_brain_mask_dil.nii.gz dilate mni_mask.nii -npass 4
standard_space_roi $CONFORMED_T1.NII T1_preBET.nii.gz -maskMASK mni_mask.nii -roiFOV
# Mask T1 (can be skipped because qsiprep does this)
bet T1_preBET.nii.gz T1_BET.nii.gz -f 0.15 -R
# Segment T1
fast T1_BET.nii.gz # Can be skipped because qsiprep does this)
run_first_all -m none -s L_Accu,R_Accu,L_Caud,R_Caud,L_Pall,R_Pall,L_Puta,R_Puta,L_Thal,R_Thal -i T1.nii -o first
# Generating partial volume images for SGM structures
mrmath [mesh2voxel_*.mif] sum - | mrcalc - 1.0 -min all_sgms.mif
mrthreshold T1_BET_pve_2.nii.gz - -abs 0.001 | maskfilter - connect - -connectivity | mrcalc 1 - 1 -gt -sub remove_unconnected_wm_mask.mif -datatype bit
### HERE IS WHERE SYNTHSEG MAPS CAN COME IN!
mrcalc T1_BET_pve_0.nii.gz remove_unconnected_wm_mask.mif -mult csf.mif
mrcalc 1.0 csf.mif -sub all_sgms.mif -min sgm.mif
mrcalc 1.0 csf.mif sgm.mif -add -sub T1_BET_pve_1.nii.gz T1_BET_pve_2.nii.gz -add -div multiplier.mif
mrcalc multiplier.mif -finite multiplier.mif 0.0 -if multiplier_noNAN.mif
mrcalc T1_BET_pve_1.nii.gz multiplier_noNAN.mif -mult remove_unconnected_wm_mask.mif -mult cgm.mif
mrcalc T1_BET_pve_2.nii.gz multiplier_noNAN.mif -mult remove_unconnected_wm_mask.mif -mult wm.mif
mrcalc 0 wm.mif -min path.mif
mrcat cgm.mif sgm.mif wm.mif csf.mif path.mif - -axis 3 | mrconvert - combined_precrop.mif -strides +2,+3,+4,+1
mrmath combined_precrop.mif sum - -axis 3 | mrthreshold - - -abs 0.5 | mrgrid combined_precrop.mif crop result.mif -mask -
# Save and check file
mrconvert result.mif $OUTPUT
5ttcheck result.mif
The text was updated successfully, but these errors were encountered:
5ttgen freesurfer isn’t very commonly used: while it is based on FreeSurfer segmentation, which is appealing, it’s a simple voxel-by-voxel mapping of binary tissue masks, so there are no partial volume estimates, that’s why it appears so jagged. Indeed it was intended primarily as an exercise in demonstrating that multiple algorithms can be proposed and implemented and distributed for a given image processing task…
Summary
Instead of FAST, use SynthSeg segmentations for 5TT/GMWMI generation
Additional details
FAST isn't great, and we already have SynthSeg outputs from QSIPrep
Next steps
Here is the full pipeline for
5ttgen fsl
, with added comments / variable names. Basically, take the below code and create a custome 5ttgen command, skipping steps and replacing segmentation maps as needed.The text was updated successfully, but these errors were encountered: