Cortical ROI mask for tractography

Hello there,

I am trying to create a brain mask which comprises the cortical start and end point ROIs of the uncinate fasciculus, so that I can feed it into my miniPROB and PROB tractography function and isolate the tractography results for this white matter bundle. I am unsure if this is the best way to go about this. I am working with neonate brains and so I have the results from FreeSurfer's infant recon all.

I have been trying to use 3dcalc and the SegID for these ROI's from the aparc+aseg.nii.gz file, but my masks are all 0. Here is an example of one of my masks...

3dcalc -a aparc+aseg_inDTI.nii.gz \
       -expr 'equals(a,133)+equals(a,442)' \
       -prefix UF_L_temporal_mask.nii.gz \
       -overwrite

Please let me know the best way forward.

Warm regards,
Philippa

Hi, Philippa-

I have never used the infant recon all. Are the list and enumeration of ROIs different than for the adult ROI?

Your 3dcalc command looks fine, assuming region #133 and #442 exist there and define the ROIs you want.

How did that aparc+aseg_inDTI.nii.gz dataset get to the DTI space? For example, was it moved there after alignment, and was the "NN" interpolant used during resampling, to preserve integers?

--pt

Hi Paul,

3dresample \
	-master $BASE/$SUBJ/INTERMED/dt_DT.nii.gz \
        -inset $BASE/$SUBJ/INTERMED/aparc+aseg.nii.gz \
        -rmode NN \
        -prefix $BASE/$SUBJ/INTERMED/aparc+aseg_dwi.nii.gz \
        -overwrite

3dcalc -a aparc+aseg_dwi.nii.gz \
       -expr 'equals(a,133)+equals(a,442)' \
       -prefix UF_L_temporal_mask.nii.gz \
       -overwrite

3dmask_tool -input UF_L_temporal_mask.nii.gz \
            -dilate_input 1 \
            -prefix UF_L_temporal_mask_dil.nii.gz \
            -overwrite

Above are my resampling to DTI space, mask creating and mask inflation. Do these commands look correct?

Kind regards,
Philippa

Hi, Philippa-

The first step with 3dresample seems mostly reasonable. I was wondering whether the -rmode NN had been included when resampling, to preserve integer values. I think if I were doing it, though, I wouldn't overwrite the -inset .. with the prefix, in case something went awry. Maybe it would be good to verify visually that the $BASE/$SUBJ/INTERMED/aparc+aseg_dwi.nii.gz dataset really does have integer values?

On a minor note in the 2nd command, the input to 3dcalc is missing the path to the file. So, I would adjust:

3dcalc -a aparc+aseg_dwi.nii.gz \

to

3dcalc -a $BASE/$SUBJ/INTERMED/aparc+aseg_dwi.nii.gz \

And maybe you would want the output file to have path info, too.

To inflate the dataset, I wouldn't use 3dmask_tool here like in the 3rd command, because the identity of each ROI would be lost---they will just have mask values of 1 in the output dataset. I would use 3dROIMaker to inflate the UF_L_temporal_mask.nii.gz dataset.

Perhaps this:

3dROIMaker                     \
   -inset UF_L_temporal_mask.nii.gz    \
   -refset UF_L_temporal_mask.nii.gz    \
   -thresh 0.5                 \
   -prefix ROI_MAP             \
   -volthr 1                 \
   -inflate 1

... where using the -refset .. like this for reference should preserve the integer labels. You can also control the neighbor-ness of inflation, with one of hte -neigh* options. You can also control the inflation, by telling the program not to inflate into some other reference datasets (or to only inflate by at most 1 voxel into a region), like where FA>0.2; this is expressly designed to help prepare ROI maps for tractography.

--pt

Thank you, Paul, this has worked for me :)

Kind regards,
Philippa