Hola-
If I can just add another option to what Peter has mentioned--
It is not necessary to average b0s, you could just select around it. Myself, however, I *do* like to do so, in order to have higher SNR in the reference signal image. (My guess is that the difference between averaging/not is pretty small in most cases.)
A1) In order to make averaging together easier, one can use 1dDW_Grad_o_Mat (of reforming diffusion gradient fame) to do the averaging for you-- if you have M gradients in a file, each ordered and corresponding to one of M data (b0+DWI) set bricks, then it will be able to pick out which are b0s from the row of '0 0 0', and averaged together the corresponding data set bricks. NB: this implies that all processing/motion correction has been done previously. The data set is input with the '-proc_dset' option, and the output prefix given with '-pref_dset'.
A2) In case 'A1', the default will be to produce a gradient file with no row of '0 0 0' corresponding to the b=0 volume-- this is to make it easier to use 3dDWItoDT. If you wanted that row of zeros for some reason, you can add one back to the top of the file with '-put_zeros_top'.
B) Additionally, if you have repetitions of gradients (for example, three sets of 30), then you can use '-dwi_comp_fac N', where N is your number of repetitions of DWIs (here, N would be 3), to average together corresponding DWIs.
--pt