Learning DTI on animal brain

Howdy-

Re. finding a pig template, I don’t have one that I have used before. I searched a bit, and there appears to be one publicly available one from Chang et al. (2020) here:
https://www.nitrc.org/projects/micropig_brain
The T2w volume there looks the cleanest (the T1 is pretty noisy). I’m not sure why there is so much empty space vertically, but then probably over-tightness along the AP axis. Also, annoyingly, there is obliquity in the header. It really should not have been constructed in that way. To clean up a few things (simpler orientation, better zeropadding all around), I would download it and then run this:

3dcopy T2_template.nii.gz __temp
3drefit -oblique_recenter __temp+tlrc.HEAD 
3drefit -deoblique __temp+tlrc.HEAD 
3dresample -orient RAI -prefix T2_template_RAI0.nii.gz -input __temp+tlrc.HEAD 

3dZeropad \
    -prefix T2_template_RAI0_ZP.nii.gz \
    -S -100 \
    -I -65 \
    -L -80 \
    -R -80 \
    -A 10 \
    -P 15 \
    T2_template_RAI0.nii.gz

\rm __temp*

… which produces a dset that looks like:

A second unfortunate thing is that there isn’t a brainmask for this dataset, and the values in the T2 template don’t stop sharply—there are small values outside where the brain is apparent. So, to create a mask, I ran:

3dcalc \
    -overwrite \
    -a T2_template_RAI0_ZP.nii.gz \
    -expr 'step(a-10)' \
    -prefix _tmp_mask0.nii.gz   

3dmask_tool \
    -overwrite \
    -dilate_input 1 -2 3 -2 \
    -prefix T2_template_RAI0_ZP_mask.nii.gz \
    -input  _tmp_mask0.nii.gz

\rm _tmp*

… and the mask looks like this, when overlaid on the T2 template:

OK, things are ready to go, then, perhaps. Note, because we only have a T2w image as reference, you will have to use a cost function that can match datasets with differing tissue contrasts (because you have a T1 volume). That is OK and doable in AFNI. So, your final @animal_warper command could look like:

@animal_warper                             \
        -input             DSET_ANAT       \
        -input_abbrev      subj_anat       \
        -base              T2_template_RAI0_ZP.nii.gz   \
        -base_abbrev       tmplt           \
        -brainmask         T2_template_RAI0_ZP_mask.nii.gz \
        -cost              lpc+ZZ \
        -outdir            odir_aw         \
        -ok_to_exist 

The lpc and related lpc+ZZ cost function were developed by Saad et al. 2009 to align EPI and T1w anatomicals, and that is similar to the job here. The “+ZZ” makes the program run slower, but it has some extra stabilization for the cost estimate.

Sooo, there is some extra work involved to get the template, and then fix/add some things to it. But please let me know how that goes.

–pt

1 Like