Combining two dwi images with b800 and b2000

I have two dwi images for each subject, b800 and b2000, I want to merge them as multi-shell image, but problem is these two images have not the same direction so when I combine them, between b800 to b2000 there would be a jump of direction, how could I solve this issue?

My understanding is that typically b-values (shells) and b-vectors (gradient directions) are recorded independently and you can just stack them like

b-values b-vectors
800 (a direction)
800 (a direction)
800 (a direction)
2000 (a direction)
2000 (a direction)
2000 (a direction)

Do you have two images or two shells (each with multiple images)?
I assume you mean the latter and that you want to do tractography and/or some kind of quantitative modeling (DTI, AFD…)
With two shells it is indeed not necessary to have the same directions acquired per shell. Often higher b-value shells are acquired along more directions than lower b-value shells.
I believe it is more important to have a uniform distribution of the directions (check ‘dirstat’ for that) than to acquire same directions per shell.

If you really mean two images (not shells of images), you probably wanted to compute ADC. In that case one of both images would need to be a b-zero. Alternatively the lower b-value could act as the ‘b-zero’ but then the directions would indeed need to be the same for the ADC to make some sense.

1 Like

I have two different Images. The b800.mif and b2000.mif. I want to merge these two.
I there any direct code to merge these two?

Can you post the output of mrinfo for each of your images? That might influence the advice we provide…

$ mrinfo b800.mif
************************************************
Image name:          "b800.mif"
************************************************
  Dimensions:        80 x 80 x 54 x 36
  Voxel size:        2 x 2 x 2 x 6.97219
  Data strides:      [ -1 2 3 4 ]
  Format:            MRtrix
  Data type:         signed 16 bit integer (little endian)
  Intensity scaling: offset = 0, multiplier = 2.75604
  Transform:                    1           0           0      -78.54
                               -0           1           0      -42.48
                               -0           0           1      -48.12
  command_history:   C:\msys641\mingw64\bin\mrconvert.exe b800.nii.gz b800.mif -fslgrad b800.bvec b8
00.bval  (version=3.0.4)
  comments:          TE=88.2559967;sec=0.0000
  dw_scheme:         0,0,0,0
  [36 entries]       0,0,0,0
                     ...
                     -0.6900933461,0.6087428995,0.3914118751,800
                     0.361709893,0.6969897752,0.6191697721,800
  mrtrix_version:    3.0.4
$ mrinfo b2000.mif
************************************************
Image name:          "b2000.mif"
************************************************
  Dimensions:        80 x 80 x 54 x 68
  Voxel size:        2 x 2 x 2 x 6.84045
  Data strides:      [ -1 2 3 4 ]
  Format:            MRtrix
  Data type:         signed 16 bit integer (little endian)
  Intensity scaling: offset = 0, multiplier = 36.725000000000001
  Transform:                    1           0           0      -78.54
                               -0           1           0      -42.48
                               -0           0           1      -48.12
  command_history:   C:\msys641\mingw64\bin\mrconvert.exe b2000.nii.gz b2000.mif -fslgrad b2000.bvec
 b2000.bval  (version=3.0.4)
  comments:          TE=77.83100128;sec=0.0000
  dw_scheme:         0,0,0,0
  [68 entries]       0,0,0,0
                     ...
                     0.4555595142,0.8510690784,-0.2610497133,2000
                     0.632138275,0.7365679908,0.2405593404,2000
  mrtrix_version:    3.0.4

OK, so that answer @tbilliet’s question: these image files contain 36 & 68 volumes respectively, so they’re full shells – not single directions. In this case, the command you’re after is dwicat – see reference documentation for details.

Notice in the comments that the TE is not constant between the two shells.

Indeed, the TE’s seem to be different. If you want to do some quantitative modeling (e.g. DTI) it is probably best to use only one of both shells (e.g. b800 for DTI).
Not sure if merging shells with different TE would have an impact on tractography.
But ok, just speculating here, we don’t know the research question :slight_smile: