Wiki

Clone wiki

ACID - Artefact correction in diffusion MRI / ACID_wiki_ecmoco

ECMOCO 2.0

Short overview

ECMOCO is an academic software for correcting linear eddy current and subject motion effects in diffusion weighted images (for details see Mohammadi et al. (2010)).

ECMOCO performs affine registration on the dMRI dataset to correct for the misalignment caused by these artifacts. Within ECMOCO, the dMRI images are registered to a target image using a modified version of the spm_coreg, a between-modality co-registration algorithm based on information theory (details can be found in the SPM tool "spm_coreg"). In an iterative manner, the algorithm applies linear transformations on the source image to maximize the normalized mutual information between the source and target images.

To address the challenges specific to the spinal cord, we introduced three new features in ECMOCO:

(i) slice-wise (2D) registration to address non-rigid, slice-dependent motion and distortion in the spinal cord

(ii) initialized registration to increase the robustness of registration for low-SNR dMRI images by interpolating the values of the high-SNR b0 images

(iii) exclusion of certain images from the registration parameter estimation if their SNR is below a pre-defined level

ECMOCO is located under: SPM -> Tools -> ACID -> Pre-Processing -> ECMOCO -> Estimate and write ECMOCO

ECMOCO Background

Fig. 1: ECMOCO within the ACID toolbox.

Pre-processing

In case you have used a reduced-FOV sequence for SC dMRI (smaller image matrix in the phase-encoding direction), it is recommended to crop (i.e. reduce the matrix size) the images along the frequency-encoded direction prior to applying ECMOCO. The reason is that structures surrounding the spinal cord (bones, ligaments, etc.) can move independently from the spinal cord, which can result in incorrect estimation of transformation parameters for the spinal cord itself. Cropping removes much of the non spinal cord tissue, thereby improving the performance of ECMOCO, and decreasing the processing time (due to reduced matrix size). To crop the images, use the ACID-SC Cropping tool

Usage

  • Source images: select the dMRI images that are supposed to be corrected for drift, motion, and eddy current distortions. The images must be in 3d or 4d nifti format. For spinal cord dMRI, the input images should be cropped.

  • Registration type: select between volume-wise and slice-wise registration. Unlike brain imaging, it is highly recommended to apply slice-wise registration for SC imaging. Note that slice-wise registration is always preceded by a volume-wise registration. Default: slice-wise.

  • Degrees of freedom for volume-wise registration: define the degrees of freedom (DOF) of the volume-wise registration in the form of a 1x12 binary array. The 12 binary entries represent (1-3) translation along x,y,z; (4-6) rotation around x,y,z; (7-9) scaling along x,y,z; (10-12) shearing along x,y,z. Recommended for SC dMRI: [1 1 0 0 0 0 0 1 0 0 0 0]

  • Degrees of freedom for slice-wise registration: define the degrees of freedom (DOF) of the slice-wise registration in the form of a 1x7 binary array. The 6 binary entries represent (1-2) translation along x,y; (3) rotation around z; (4-5) scaling along x,y; (6-7) shearing along x and y. Recommended for SC dMRI: [1 1 0 0 1 0]

  • b values: enter the corresponding b values of the selected dMRI images. This will be used to perform multi-target registration, i.e. creating separate registration groups for each b-value.

  • Initialization mode: If ON, the iteration of the transformation (trafo) parameters will be initialized by the interpolated values of the trafo parameters of the b0 volumes. Recommended for slowly varying motion in the dataset.

  • Excluded volumes: The indices of volumes entered here will not be fed into the registration algorithm. Instead, the transformation parameters of the neighboring volumes will be applied to them. Tip: Enter here the volume indices that you labeled during visual inspection of the data and are stored in the ‘labeled_slices.mat’ file.1)

  • Bias field image: not recommended for SC DTI. Leave it unspecified by clicking ‘Done’.

  • Defaults: it contains a number of options related to the display and saving of the transformation parameters and corrected images. Recommended: keep the default options.

    Choose display option: if ON, the obtained transformation parameters will be plotted and saved as matlab figures. This option might be helpful to visually assess the artifact level in the dataset (Fig. 2). Default: ON

    Choose write option: if ON, the obtained transformation parameters will be used to reslice and save the dataset. Default: ON

    Prefix for output: prefix for the output filename. Default: r

    Parameter for histogram thresholding: Voxels with and below this intensity value will be excluded from the parameter estimation. Default: 0

    Parameter for resampling: optimisation sampling steps (mm). Default: [4 2]

    Interpolation order: Type of interpolation as defined in spm_reslice. Default: -7

    Direction of phase-encoding: choose the phase-encoding direction of your dataset (x,y,z). Default: y

  • Registration parameters: Choose the parameters, which you want to correct. You can choose between 12 affine parameters. The 4 eddy current parameters are displayed in Figure 1. I propose three sets of parameters for different purposes (see below), but you can select the parameters freely.
    Proposed parameters: a) Correcting only for subject motion: [1 1 1 1 1 1 0 0 0 0 0 0]; b) Correcting only for subject motion and whole-brain eddy currents: [1 1 1 1 1 1 0 1 0 1 1 0]; c) Correcting distortions in a spherical phantom: [1 1 1 0 0 0 1 0 1 1 0]. Note that the input vector for this parameter must have 12 binary components, i.e. for each component you can choose between 0 and 1 (0: the parameter is not estimated; 1: the parameter is estimated).

Output

  • ECMOCO corrected dataset: a nifti file with prefix 'r' (by default). It is 3d file for 3d input and 4d file for 4d input. Use this dataset for further analysis.

  • estimated transformation parameters: a mat file with prefix 'ecmoco_pars_'. The file contains a 3d matrix (12 x num_of_images x num_of_slices)for slice-wise registration and a 2d matrix (12 x num_of_images) for volume-wise registration.

  • figures of the transformation parameters: For slice-wise registration, a single figure matlab is saved (prefix: 'ALL_params_')with as many subfigures as the degrees of freedom of the registration, where each subfigure displays the parameters for all slices and all images. For volume-wise registration, two separate figures are saved (prefix: 'MO_params_' and 'EC_params_'), with the first figure displaying the motion parameters (translation and rotation along x,y,z), and the other showing the eddy-current distorion parameters (translation in y, scaling in y, shearing in y and z). Note that these figures are output only if the display option is set ON.

ECMOCO Background

Fig. 2: The whole-brain eddy current distortions (3rd row) are corrected by affine transformations when the corresponding parameters (2, 8, 10 and 11, 1st row) are enabled. Note that this toolbox only corrects for image distortions that are related to the linear components of the EC field (4th row).

ECMOCO Background 2

Fig. 3: The EC (left) and motion (right) parameters for an example DTI dataset with 200 diffusion weighting directions.

ECMOCO Background 2

Fig. 3: Plotted transformation parameters for slice-wise registration. The dataset consisted of 144 images and 3 degrees of freedom were specified (translation in x, y, and scaling in y).

ECMOCO Background 2

Fig. 4: Plotted transformation parameters for volume-wise registration. The dataset consisted of 144 images and 3 degrees of freedom were specified (translation in x, y, and scaling in y).

Quality assessment

It is highly recommended to assess the nature and amount of motion and distortion in the dataset, as well as to evaluate the performance of ECMOCO. The matlab figures saved by ECMOCO (see Output section above) give you an idea about the amount of displacements with respect to the specified degrees of freedom. Note that sudden, extensive displacements (i.e. spikes) in the transformation parameters could be a sign of misregistration.

The performance of ECMOCO can be assessed by comparing the corrected vs. the non-corrected dataset in terms of displacement across images. It is expected that ECMOCO largely reduces motion and eddy current related displacements. ACID-SC provides a tool for comparing ECMOCO corrected and non-corrected dataset under ACID-SC -> Miscellaneous -> Check registration:

ECMOCO Background 2

Fig. 5: Qualitative comparison of various registration methods including (a) unprocessed case, (b) volume-wise registration, and (c) slice-wise registration. The plots show 1D cuts along the y-direction extracted at constant x- and z-coordinates in each DW image in a single subject with the most motion in the cohort. The concatenation of these 1D cuts across the 120 images highlights the spatial misalignment occurring along the phase-encoding direction and helps assess the improvements due to spatial registration. Zoomed view of a subset of images is also provided for (a)-(c) to further emphasize the improvements observed after slice-wise registration. Substantial movement along the y-direction was present in the dataset which was significantly reduced when applying registration. However, volume-wise registration was not equally effective in all images to correct for spatial misalignment (see outlier in the middle of the dataset for an example of incorrect registration).

Detailed description

ECMOCO consists of 5 steps as seen below, where the numbering is consistent with that in Fig. 5.

  1. The type of the registration (SW or VW) and the degrees of freedom (DOF) of the affine transformation are specified by the user (Fig. 2A). Note that in case of SW registration, two sets of DOF have to be specified (one for the preceding VW, and one for the actual SW registration).

  2. Target volumes are created using either the single- or multi-target approach. In the multi-target registration approach, separate registration groups are created for each b-value. If this option is selected, the b-values of all N dMRI volumes have to be entered in the form of a 1 x N array. Within each registration group, a separate target volume is generated by averaging all volumes of the same b-value (Fig. 2B). Then, each volume of the dMRI dataset is registered to the corresponding target volume. This is meant to increase the robustness of the registration, as dMRI volumes show markedly different contrasts depending on their b-value, which can result in imperfect or even failed registration. In contrast, the single-target registration approach is performed when all b-values are artificially set to the same value. In this case, all volumes are registered to a single target volume created by averaging all volumes.

  3. Transformation parameters are obtained between all b0 volumes and the corresponding template. Registration of the b0 volumes can be initialized by the transformation of the previous b0 volume (initialization mode). Importantly, only the DOF associated with rigid-body transformation are applied for the b0 volumes, since eddy currents are expected to be negligible for b0 volumes due to the lack of diffusion-weighted gradients.

  4. Transformation parameters are obtained between all DW volumes and the corresponding template. Similarly, the registration can be volume-wise or slice-wise. The registration of the DW volumes can be initialized by the interpolated transformation parameters of the b0 volumes (rigid-body parameters only).

  5. The obtained transformation parameters are applied to reslice all volumes.

ECMOCO Background 2

Fig. 6: Registration scheme of an example MRI dataset consisting of two blocks of b0 images (n images each) and two blocks of DW images (N images each) interspersed with each other. In the multi-target mode, b0 and DW images constitute separate registration groups and are registered to their corresponding target image. In the single-target mode, both b0 and DW images are registered to the same target. First, the b0 images are registered using the rigid-body part of the specified DOF only, followed by the registration of the DW images using all specified DOF. In the initialization mode, the parameter iteration of the b0 images is initialized by the previous b0 image, while the iteration of the DW images is initialized by the interpolated values of the b0 images (for the first DW group) or by the closest b0 image (for the second DW group).

Referencing

Mohammadi S, Moller HE, Kugel H, Muller DK, Deppe M (2010) Correcting eddy current and motion effects by affine whole-brain registrations: evaluation of three-dimensional distortions and comparison with slicewise correction. Magn Reson Med 64: 1047-1056; doi: 10.1002/mrm.22501

(Please cite this paper when using this toolbox)

Updated