9590
Comment:
|
10060
|
Deletions are marked like this. | Additions are marked like this. |
Line 67: | Line 67: |
{{{IPEDcorrect}}} can take several inputs {{{ 'spatial_beta', 0.27, ... 'spherical_alpha', 0.04, ... 'shOrder', 8, ... must be even >0 'sph_wt', 'G_mag', ... 'G_mag'/[]/filename 'G_mag_low', 1*2*pi, ...rad/sec/mm 'G_mag_high', 9*2*pi, ...rad/sec/mm 'estimation_mask', '', ... mask filename 'isfull', false, ... 'deform_upscale', 16, ... 'save_SH_coeff', 1 ... 0/1/2; 1=BrainSuite style SH-coeff; 2=single 4D file ); }}} |
Distortion correction using interlaced q-space sampling
This page provides a precompiled Matlab implementation ("p-code") of a distortion correction method for diffusion MRI using the interlaced q-space sampling technique. This method uses interlaced phase-encoding directions (IPED) while sampling the q-space, which enables accurate distortion correction without increasing the acquisition time. Please see following references for more details of the method:
C. Bhushan, A. A. Joshi, R. M. Leahy and J. P. Haldar (2014), Improved B0-distortion correction in diffusion MRI using interlaced q-space sampling and constrained reconstruction. Magnetic Resonance in Medicine, 72: 1218-1232. doi: 10.1002/mrm.25026
C. Bhushan, A. A. Joshi, R. M. Leahy and J. P. Haldar (2013), Accelerating data acquisition for reversed-gradient distortion correction in diffusion MRI: A constrained reconstruction approach. 21st Scientific Meeting of International Society for Magnetic Resonance in Medicine (ISMRM), Salt Lake City, p. 55. Abstract PDF, ISMRM presentation video
Data acquisition
This implementation makes several assumptions about the data acquisition and sampling pattern in the q-space. All of the following must be satisfied for accurate correction:
- The diffusion data should be scanned with single-shot Echo Planar Imaging (EPI) sequence.
- The EPI planes for data acquired with different phase encoding directions (PED) must coincide. This also implies that ignoring the polarity of PEDs there could be maximum of two PEDs, one along each dimension of 2D EPI plane (without ignoring the polarity of PEDs there could be maximum of four PEDs).
- Atleast two different PEDs must be used to sample the q-space.
All the diffusion weighted images must be acquired with a single b-value i.e. assumes single-shell acquisition (multi-shell acquisition can also be used - by correcting diffusion data for each shell separately).
- Atleast one diffusion image must be acquired with (almost) no diffusion weighting (b-value of zero) for each unique PED.
The inhomogeneity in main magnetic field (B0) should be same across all diffusion weighted images i.e. all the diffusion images must be acquired with same shim settings.
- The field of view, voxel resolution, image matrix size, number of slices and slice thickness should be consistent across all images.
Further, take note about following to enable accurate distortion correction with IPED method with this implementation:
- It is recommended to use more than 20 unique diffusion encoding directions. Larger number of diffusion encoding direction would enable better correction.
- The diffusion encoding directions should be evenly distributed on the sphere (or one hemisphere).
The diffusion encoding directions for each PEDs should be evenly interlaced i.e. encoding directions should be evenly distributed for each unique PED as well as for intersection of all PEDs.
- In case of multi-shell acquisition, the above recommendation applies to each shell.
This implementation also works with reversed-gradient (Chang and Fitzpatrick, 1992) and its generalized acquisition schemes. Also see user_opts below for more options.
Usage
The distortion correction method is implemented as a Matlab function, named IPEDcorrect, and requires Image processing toolbox. It only supports use of NIfTI-1 data format for image and plain text-files for specifying other parameters. Either of following syntax is supported:
IPEDcorrect(IPED_config_filename, fieldmap_filename, echo_spacing, output_base) IPEDcorrect(IPED_config_filename, fieldmap_filename, echo_spacing, output_base, opts)
where,
IPED_config_filename is a string specifying the file-name of the IPED-config file. See below for more details about format of the IPED-config file.
fieldmap_filename is a string specifying the file-name of the fieldmap saved in NIfTI-1 format. The fieldmap can acquired or estimated using any method but it must be specified in units of radians/sec. The voxel resolution of fieldmap need not match to that of the diffusion images, however for best correction it should cover the field-of-view of the diffusion scans.
echo_spacing is a number specifying the echo-spacing in units of secs. Eg: For an echo spacing of 0.36ms, use 0.00036.
output_base is a string specifying the file-prefix for the outputs written by IPEDcorrect. Eg: when output_base is set to sub02.IPED-corrected, the file-names of the outputs written by IPEDcorrect would be sub02.IPED-corrected.nii.gz, sub02.IPED-corrected.bvec and likewise.
opts is an optional input which specifies several optional arguments, like regularization parameters, for distortion correction. See below for more details.
IPED-config file
IPED-config file is a plain text file which describes different acquisition parameters for the diffusion data. The file follows a table-type format, which can be created and saved using a simple text editor. The IPED-config file can be saved with any extension. Each row of the file describes parameter for diffusion images corresponding to one phase-encoding direction. Number of columns in each row should be consistent and must have three, four or five columns. The first column specifies the filename of the 4D NIfTI-1 diffusion file. Second column specifies the phase encoding direction (PED). Rest of the columns specifies filenames which describe diffusion encoding parameters as shown below. In addition, any text coming after a # (hash) is ignored for rest of the line.
Four columns (with bvec, bval file):
4D-nifti-filename.nii.gz PED bvec-filename bval-filename
Three columns (with bmat file):
4D-nifti-filename.nii.gz PED bmat-filename
Five columns (with bvec, bval and bmat file):
4D-nifti-filename.nii.gz PED bvec-filename bval-filename bmat-filename
Filenames can be specified either with their full-path or without any path (for the later case, files are assumed to be in the same directory as the IPED-config file. Relative paths (eg: subdirectory/file.nii.gz) are not supported. When the filenames/paths contain spaces then they must be enclosed in double quotes (eg: "subject23 trial2.nii.gz"). Different columns of the config file can also be delimited by comma, like that in standard csv files (in case of csv format, filenames with spaces can be directly specified and must not use double quotes).
EPI images are most distorted along the phase encoding direction (PED) and IPEDcorrect formulates the distortion correction as a 1D problem. PED can be easily be specified after visualizing the images in BrainSuite software. Valid options for PED are x, x-, y, y-, z and z-. x direction increases towards the right side of the subject, while x- increases towards the left side of the subject. Similarly, y and y- are along the anterior-posterior direction of the subject, and z and z- are along the inferior-superior direction. The figure on the right describes the PED directions in different views. The image shown in the above figure (full BrainSuite view) has PED of y-. The polarity of the PED depends on the sign convention of the fieldmap and it can be best adjusted by trying the function with different polarity.
The bvec and/or bmat files should describe diffusion encoding direction in voxel coordinate of the diffusion data (i.e. in the same frame of reference as the image matrix). Further, the order of entries of gradient direction in the specified .bvec or .bmat file must match the order of volumes in the input 4-D NIfTI data.
user_opts
IPEDcorrect can take several inputs
'spatial_beta', 0.27, ... 'spherical_alpha', 0.04, ... 'shOrder', 8, ... must be even >0 'sph_wt', 'G_mag', ... 'G_mag'/[]/filename 'G_mag_low', 1*2*pi, ...rad/sec/mm 'G_mag_high', 9*2*pi, ...rad/sec/mm 'estimation_mask', '', ... mask filename 'isfull', false, ... 'deform_upscale', 16, ... 'save_SH_coeff', 1 ... 0/1/2; 1=BrainSuite style SH-coeff; 2=single 4D file );
Downloads
This code is licensed under the CC Attribution-Noncommercial-Share Alike 4.0 License. Please cite [1] and [2] if you use this code or its derivatives in your own work.
In no event shall the University of Southern California, the Authors, or the Distributors be liable to any party for direct, indirect, special, incidental, or consequential damages, including lost profits, arising out of the use of this software, its documentation, or any derivatives thereof, even if the authors have been advised of the possibility of such damage. The University of Southern California, the Authors, and the Distributors specifically disclaim any warranties, including, but not limited to, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement. This software is provided on an "as is" basis, and the authors and distributors have no obligation to provide maintenance, support, updates, enhancements, or modifications. This software is for research purposes only and has not been approved for clinical use.
Download IPEDcorrect.zip (Last Modified: Apr 12, 2015)