Skip to content

Commit

Permalink
tracula update (freesurfer#859)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahoopes authored May 25, 2021
1 parent fd39b86 commit d961964
Show file tree
Hide file tree
Showing 44 changed files with 5,305 additions and 3,388 deletions.
99 changes: 63 additions & 36 deletions distribution/FreeSurferColorLUT.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1046,44 +1046,71 @@
#
5100 fmajor 204 102 102 0
5101 fminor 204 102 102 0
5102 cc.body 204 102 102 0
5103 cc.bodyc 255 153 153 0
5104 cc.bodypf 255 153 153 0
5105 cc.bodypm 255 204 204 0
5106 cc.bodyp 255 102 102 0
5107 cc.bodyt 255 204 204 0
5108 cc.genu 255 102 102 0
5109 cc.rostrum 204 51 51 0
5110 cc.splenium 204 51 51 0
5111 acomm 204 102 102 0
5112 mcp 102 51 153 0
#
5102 lh.atr 255 255 102 0
5103 lh.cab 153 204 0 0
5104 lh.ccg 0 153 153 0
5105 lh.cst 204 153 255 0
5106 lh.ilf 255 153 51 0
5107 lh.slfp 204 204 204 0
5108 lh.slft 153 255 255 0
5109 lh.unc 102 153 255 0
5200 lh.atr 255 255 102 0
5201 lh.cab 153 204 0 0
5202 lh.ccg 0 153 153 0
5203 lh.cst 204 153 255 0
5204 lh.ilf 255 153 51 0
5205 lh.slfp 204 204 204 0
5206 lh.slft 153 255 255 0
5207 lh.unc 102 153 255 0
5208 lh.cb 0 153 153 0
5209 lh.slf 204 204 204 0
5210 lh.af 153 255 255 0
5211 lh.ifof 51 153 51 0
5212 lh.fx 255 153 204 0
5213 lh.fat 204 51 102 0
5214 lh.or 153 102 255 0
5215 lh.mlf 255 255 204 0
5216 lh.slf1 51 204 255 0
5217 lh.slf2 51 255 204 0
5218 lh.slf3 204 204 204 0
5219 lh.afd 153 255 255 0
5220 lh.afv 153 255 255 0
5221 lh.ar 153 0 204 0
5222 lh.cbd 0 153 153 0
5223 lh.cbv 153 204 0 0
5224 lh.emc 51 153 51 0
5225 lh.uf 102 153 255 0
#
5110 rh.atr 255 255 102 0
5111 rh.cab 153 204 0 0
5112 rh.ccg 0 153 153 0
5113 rh.cst 204 153 255 0
5114 rh.ilf 255 153 51 0
5115 rh.slfp 204 204 204 0
5116 rh.slft 153 255 255 0
5117 rh.unc 102 153 255 0

# These are the same tracula labels as above in human-readable form
5200 CC-ForcepsMajor 204 102 102 0
5201 CC-ForcepsMinor 204 102 102 0
5202 LAntThalRadiation 255 255 102 0
5203 LCingulumAngBundle 153 204 0 0
5204 LCingulumCingGyrus 0 153 153 0
5205 LCorticospinalTract 204 153 255 0
5206 LInfLongFas 255 153 51 0
5207 LSupLongFasParietal 204 204 204 0
5208 LSupLongFasTemporal 153 255 255 0
5209 LUncinateFas 102 153 255 0
5210 RAntThalRadiation 255 255 102 0
5211 RCingulumAngBundle 153 204 0 0
5212 RCingulumCingGyrus 0 153 153 0
5213 RCorticospinalTract 204 153 255 0
5214 RInfLongFas 255 153 51 0
5215 RSupLongFasParietal 204 204 204 0
5216 RSupLongFasTemporal 153 255 255 0
5217 RUncinateFas 102 153 255 0
5300 rh.atr 255 255 102 0
5301 rh.cab 153 204 0 0
5302 rh.ccg 0 153 153 0
5303 rh.cst 204 153 255 0
5304 rh.ilf 255 153 51 0
5305 rh.slfp 204 204 204 0
5306 rh.slft 153 255 255 0
5307 rh.unc 102 153 255 0
5308 rh.cb 0 153 153 0
5309 rh.slf 204 204 204 0
5310 rh.af 153 255 255 0
5311 rh.ifof 51 153 51 0
5312 rh.fx 255 153 204 0
5313 rh.fat 204 51 102 0
5314 rh.or 153 102 255 0
5315 rh.mlf 255 255 204 0
5316 rh.slf1 51 204 255 0
5317 rh.slf2 51 255 204 0
5318 rh.slf3 204 204 204 0
5319 rh.afd 153 255 255 0
5320 rh.afv 153 255 255 0
5321 rh.ar 153 0 204 0
5322 rh.cbd 0 153 153 0
5323 rh.cbv 153 204 0 0
5324 rh.emc 51 153 51 0
5325 rh.uf 102 153 255 0

########################################

Expand Down
2 changes: 1 addition & 1 deletion distribution/trctrain/trctraindata.tar.gz
90 changes: 69 additions & 21 deletions include/cma.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,29 +313,77 @@
#define SUSPICIOUS 999 // 255 100 100 0


// Tracula labeling
// TRACULA labeling
// Interhemispheric tracts
#define fmajor 5100 // 204 102 102 0
#define fminor 5101 // 204 102 102 0
#define lh_atr 5102 // 255 255 102 0
#define lh_cab 5103 // 153 204 0 0
#define lh_ccg 5104 // 0 153 153 0
#define lh_cst 5105 // 204 153 255 0
#define lh_ilf 5106 // 255 153 51 0
#define lh_slfp 5107 // 204 204 204 0
#define lh_slft 5108 // 153 255 255 0
#define lh_unc 5109 // 102 153 255 0
#define rh_atr 5110 // 255 255 102 0
#define rh_cab 5111 // 153 204 0 0
#define rh_ccg 5112 // 0 153 153 0
#define rh_cst 5113 // 204 153 255 0
#define rh_ilf 5114 // 255 153 51 0
#define rh_slfp 5115 // 204 204 204 0
#define rh_slft 5116 // 153 255 255 0
#define rh_unc 5117 // 102 153 255 0
#define lh_ifof 5118 // 153 255 255 0
#define rh_ifof 5119 // 153 255 255 0
#define lh_fornix 5120 // 204 102 153 0
#define rh_fornix 5121 // 204 102 153 0
#define cc_body 5102 // 255 153 153 0
#define cc_bodyc 5103 // 255 102 102 0
#define cc_bodypf 5104 // 255 102 102 0
#define cc_bodypm 5105 // 255 153 153 0
#define cc_bodyp 5106 // 255 102 102 0
#define cc_bodyt 5107 // 255 153 153 0
#define cc_genu 5108 // 255 102 102 0
#define cc_rostrum 5109 // 204 51 51 0
#define cc_splenium 5110 // 204 51 51 0
#define acomm 5111 // 204 102 102 0
#define mcp 5112 // 102 51 153 0

// Left hemi tracts
#define lh_atr 5200 // 255 255 102 0
#define lh_cab 5201 // 153 204 0 0
#define lh_ccg 5202 // 0 153 153 0
#define lh_cst 5203 // 204 153 255 0
#define lh_ilf 5204 // 255 153 51 0
#define lh_slfp 5205 // 204 204 204 0
#define lh_slft 5206 // 153 255 255 0
#define lh_unc 5207 // 102 153 255 0
#define lh_cb 5208 // 0 153 153 0
#define lh_slf 5209 // 204 204 204 0
#define lh_af 5210 // 153 255 255 0
#define lh_ifof 5211 // 51 153 51 0
#define lh_fx 5212 // 255 153 204 0
#define lh_fat 5213 // 204 51 102 0
#define lh_or 5214 // 153 102 255 0
#define lh_mlf 5215 // 255 255 204 0
#define lh_slf1 5216 // 51 204 255 0
#define lh_slf2 5217 // 51 255 204 0
#define lh_slf3 5218 // 204 204 204 0
#define lh_afd 5219 // 153 255 255 0
#define lh_afv 5220 // 153 255 255 0
#define lh_ar 5221 // 153 0 204 0
#define lh_cbd 5222 // 0 153 153 0
#define lh_cbv 5223 // 153 204 0 0
#define lh_emc 5224 // 51 153 51 0
#define lh_uf 5225 // 102 153 255 0

// Right hemi tracts
#define rh_atr 5300 // 255 255 102 0
#define rh_cab 5301 // 153 204 0 0
#define rh_ccg 5302 // 0 153 153 0
#define rh_cst 5303 // 204 153 255 0
#define rh_ilf 5304 // 255 153 51 0
#define rh_slfp 5305 // 204 204 204 0
#define rh_slft 5306 // 153 255 255 0
#define rh_unc 5307 // 102 153 255 0
#define rh_cb 5308 // 0 153 153 0
#define rh_slf 5309 // 204 204 204 0
#define rh_af 5310 // 153 255 255 0
#define rh_ifof 5311 // 51 153 51 0
#define rh_fx 5312 // 255 153 204 0
#define rh_fat 5313 // 204 51 102 0
#define rh_or 5314 // 153 102 255 0
#define rh_mlf 5315 // 255 255 204 0
#define rh_slf1 5316 // 51 204 255 0
#define rh_slf2 5317 // 51 255 204 0
#define rh_slf3 5318 // 204 204 204 0
#define rh_afd 5319 // 153 255 255 0
#define rh_afv 5320 // 153 255 255 0
#define rh_ar 5321 // 153 0 204 0
#define rh_cbd 5322 // 0 153 153 0
#define rh_cbv 5323 // 153 204 0 0
#define rh_emc 5324 // 51 153 51 0
#define rh_uf 5325 // 102 153 255 0


/*
Expand Down
2 changes: 1 addition & 1 deletion infant/infant_recon_all
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ endif
set asegfile = $WORK_DIR/aseg.nii.gz
# switching OLD thalamus labels to NEW FS standard ones
set cmd = (mri_binarize --i $asegfile --replace 48 49 --replace 9 10 --o $asegfile)
set cmd = (mri_binarize --i $asegfile --replaceonly 48 49 --replaceonly 9 10 --o $asegfile)
echo $cmd >> $LF
echo $cmd >> $sLF
$cmd |& tee -a $LF
Expand Down
2 changes: 1 addition & 1 deletion infant/infant_recon_py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ else:

# Switching old thalamus labels to new FS ones
recoded = 'work/recoded.nii.gz'
commands.append(f'mri_binarize --i {mrf_seg} --replace 48 49 --replace 9 10 --o {recoded}')
commands.append(f'mri_binarize --i {mrf_seg} --replaceonly 48 49 --replaceonly 9 10 --o {recoded}')

# Full brain
# TODO is this even used?
Expand Down
Loading

0 comments on commit d961964

Please sign in to comment.