Defining the Diffusion-Weighting Gradients and b-Matrices

Diffusion-weighted imaging for tensor calculation and tractography requires the application of diffusion-weighting gradient pulses in multiple directions. In order to correct the gradient-induced image warping that occurs with echo-planar imaging (EPI), it is necessary to know the set of gradient directions used. Furthermore, for calculation of the diffusion tensor images, it is necessary to know the set of b-matrices.

Getting the B-matrices Automatically

It may be possible to extract the gradient vectors or b-matrices from the input images automatically. However, this is only possible under certain circumstances:

To try extract the gradient information from the images, select the get_from_input_image_check check-box. If this fails, you should then try to set the gradient vectors and b-matrices manually.

Setting the B-matrices Manually

If the set of gradient vectors is known, then Jim is able to use these to calculate approximate b-matrices. However, if you know the b-matrix values, you should use these since the b-matrices calculated by Jim using the gradient vector directions is only approximate.

The gradient vectors and b-matrices for a particular pulse sequence will only need to be entered once. They will be stored in a file and can then be reused for other datasets acquired using the same pulse sequence and gradient vector set.

Note: Jim expects that coordinate system axes for the gradient vectors and b-matrices is coincident with the row, column and slice directions of the images which are to be analysed. However, many clinical MRI scanners use gradient vector coordinates which are referenced to the patient coordinate system (right-left, anterior-posterior, inferior-superior). If images are acquired on a DICOM-compliant imaging system, your gradient vectors will probably be defined with reference to the patient coordinate system. If this is the case, you should check the grad_pat_coords_check check-box. If in doubt, you should consult your MRI equipment supplier or local diffusion imaging expert.

Note: in order for Jim to transform the gradient vectors and b-matrices from the patient coordinate system to the row/column/slice directions, it is necessary to know the orientation of the image slice planes in patient coordinates. This information is only retained if you convert your images to the UNC or NIFTI formats; it is not retained for AnalyzeTM 7.5 format images. Furthermore, this information may not be present if you convert your images using a version of Jim prior to Version 5.0. If the required information is not present, Jim may or may not report an error; if it does, you will be unable to compute the diffusion tensor. Please exercise caution when interpreting results from diffusion tensor imaging if you are not sure about the coordinate systems used.

You define and set the gradient vectors and b-matrices in the "Gradient Specification" panel of the DTI Processing tab:

gradient_spec

The gradient and b-matrices are stored in an XML file, the specification of which is given in the file formats chapter of this manual.

If you have previously defined your set of gradient vectors and b-matrices, you can select the XML file by clicking on the select_xml_button button, or typing in the full path to the XML file in the field to the left of the button. If you have not previously defined them, you can do so now by clicking on the launch_gradient_spec_button button. This will bring up the gradient table / b-matrices editor dialog as shown below:

grad_editor_dialog

You can use this to enter the set of gradient vectors or b-matrices, or both.

First set the number of gradient directions used:

num_vec_spinner

This will alter the number of spaces in the tables for you to enter the gradient vectors and b-matrices.

Note: the number of images acquired with no diffusion weighting must be included in the number of gradient directions.

Next, set the units in which your b-values will be entered using the menu:

b_units_combo

You can select units of:

Choose whichever is the most convenient for you to enter the values.

Entering the Gradient Vectors

It is only absolutely necessary to enter the set of gradient vectors if you need to perform gradient-induced image distortion correction. If you want to calculate the tensor without performing distortion correction, you can enter either the gradient vectors or the b-matrices.

To enter the gradient vectors, make sure that the grad_vectors_check check-box is selected. Then, you can enter the x-, y- and z- components of each of the gradient vectors in the rows of the gradient table. Below is illustrated the first four entries for a set of gradient vectors starting (0,0,0) (1,0,0) (0,1,0) (0,0,1).

grad_table

Ensure that all fields in the table are filled. If you already have your gradient vector component values in tabular form in a text file, you can load the values into the table by clicking the load_gradients_button button. This will pop up a file chooser so that you can select the text file in which the gradient vector components are defined. The text file must contain three space-separated columns of numbers, where the first column contains the x-components, the second column contains the y-components, and the third column contains the z-components. The number of lines (rows) in the text file must equal the number of gradient vectors/b-matrices that you have already set.

If you want to use this set of gradient vectors to calculate the b-matrices, you must also set the "Nominal b-value": nominal_b. The gradient table/b-matrices editor can use the gradient vectors and nominal b-value to calculate (approximate) b-matrices, if the b-matrices are not known. However, if you enter the b-matrices as described below, the entered b-matrices will always be preferentially used in the calculation of the diffusion tensor. In the absence of explicit b-matrices, the elements of the b-matrices are calculated from the vector components and nominal b-value (bnom) in the following way:

Entering the b-Matrices

If you are not calculating the b-matrices from the set of gradient vectors, then you must enter a table of b-matrices. To enter the b-matrices, make sure that the b_matrices_check check-box is selected. Then, you can enter six components of each of the b-matrices in the rows of the b-matrix table, as illustrated below.

b_matrices

Ensure that all fields in the table are filled. If you already have your b-matrix component values in tabular form in a text file, you can load the values into the table by clicking the load_b_matrices_button button. This will pop up a file chooser so that you can select the text file in which the gradient vector components are defined. The text file must contain six space-separated columns of numbers, where the first column contains the bxx components, the second column contains the bxy components, the third column contains the bxz components, the fourth column contains the byy components, the fifth column contains the byz components, and the sixth column contains the bzz components. The number of lines (rows) in the text file must equal the number of gradient vectors/b-matrices that you have already set.

When you have set up your gradient vectors and/or b-matrices, you should save them to an XML file on disk by clicking on the save_to_xml_button button. If you wish to view or edit a set of gradient vectors/b-matrices that you have already defined, you can click on the load_from_xml_button button to load the values into the gradient specification editor. In either case, a File Chooser will pop up so that you can select the XML file.

Having defined the gradient vectors and b-matrices for your image dataset, you can now go on to set the input images then perform warp correction and diffusion tensor calculation.

Jim Home