NAME
diff_preprocess.pl - Preprocessing of diffusion weighted sets
SYNOPSIS
diff_preprocess.pl -dirs <dirs.txt> -b <bvalue> -b0 <num> [-cod <xyz or prs>] -anat <anatomical.mnc> <input1.mnc ...>
DESCRIPTION
diff_preprocess.pl can be used to preprocess diffusion weighted images. Including:
non-uniformity correction of the anatomical writing diffusion information to the header using minc_modify_header-diff.pl registering multiple DWI sets (using mritoself) registering all diffusion images to the anatomical (using minctracc) creating a brain mask (using mincbet) Registration of DWI sets
As a general rule, all diffusion weighted images should be registered to each other. However, because the contrast between images acquired in different directions can be significantly different, conventional registration approaches such asmritoself
might fail (some methods are going to be developed to deal with this). In the meantime, we often assume the subject has not moved within a run and we only register the b=0 image (first frame of DW set) to the anatomical.
Averaging of DWI sets
In the case where multiple diffusion sets were acquired, increased SNR can be achieved by combining the sets. However, care must be taken in doing so. Some assumptions have to be made at this point, which are probably inconsistent with reality but seems to be the current approach in the literature. First, we assume that there is no motion across a set. Second, we assume that if there was motion, it occured during the time between the acquisition of the sets (i.e. DW set 1 in position 1, DW set 2 in position 2).NOTES:
- The resulting set will have a number of directions equal to the sum from each DWI set and this is equivalent to averaging in terms of SNR (i.e. for 2 runs, each with 32 directions and 1 b=0 image, you expect the output have a time dimension of 66.)
- The registration needed between the sets should be quite small (if your subject is good!) and then you might want to drop the inter-run registration altogether to limit your diskspace (you can see the parameters of these transformation files (output as dtiname-to-self.xfm) usingxfm2param
)
- The script also works for a single set, we just skip the averaging step
IMPORTANT: make sure the permissions on the diffusion series are read/write (chmod 664 diff.mnc
)
OPTIONS
Usage: diff_preprocess.pl [options] [-dirs < dirs.txt > -b < bvalue > -b0 < num > ] [-b_baseline < bvalue > ] [-cod < xyz or prs > ] -anat < anatomical.mnc > < input1.mnc ... > < output.mnc > Note: by default, multiple series will be concatenated, not averaged, the SNR gain is the same -help for options Summary of options: -clobber clobber all output files -noclobber opposite of -clobber [default] -dirs list of diffusion gradient directions (formatted like ~ilana/DTI_docs/MGH/gradient_mgh_dti/gradient_mgh_dti*.gdt) [default: "already in mincheader"] -b b value [default: "already in mincheader"] -b0 number of baseline images [default: "already in mincheader"] -b_baseline b value of baseline images [default: 0] -cod coordinate system of vectors (xyz) or (prs) [default: xyz] -anat anatomical image Generic options -help: Print summary of command-line options and abort.
OUTPUTS
- anat-n3.mnc - non-uniformity corrected anatomical
- dtiname-to-self.xfm* - transformation file from dti series x to 1st set
- dti-to-t1.xfm - transformation file from dti series to anatomical
- anat-n3-bet_mask.mnc - brain mask
*only when using multiple DWI sets
EXAMPLES
Register two DWI sets (runs 1 and run 2) to each other and to the anatomical and create a brain mask.
diff_preprocess.pl -dirs ~ilana/DTI_docs/MGH/MGHdiffgrad/diffgrad32.txt -b 1000 -b0 1 -anat anatomical.mnc DWI_run1.mnc DWI_run2.mnc