Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

If your subjects' DTI and/or fMRI images are distorted you should perform distortion correction before proceeding with preprocessing in the ‘Preclinical’ GUI (i.e. you should perform distortion correction on DTI and fMRI images in native space, before they are realigned/coregistered).

  1. Create a new folder and name it ‘Distortion Correction’.

  2. Create a subject sub-folder and in this sub-folder, create the following folders: ‘clean’, ‘DTI’, fMRI', 'headers'.

  3. Copy and paste the newly created subject folder for as many subjects as you have i.e. if you have a total of 50 subjects, copy and paste the folder 50 times and then rename each folder with it’s subject’s name. This saves you from having to create all of these subfolders for each subject (would be very time consuming).

  4. Open the first subject folder and copy in the Bruker Field Map nifti file from your ‘Converted data’ folder.

  5. Convert the field map from nifti to img/hdr format in CSPM → ‘Image' → 'Convert img/hdr to nii (or vice versa)'. Rename both newly created files 'fpm’.

  6. Copy in the following files from your ‘Converted Data’ folder into each subject’s sub-folders:

Folder

Files

clean

  • Bruker Field Map nifti file

  • 4D DWI file (rename it with its subject name and ‘DTI’)

  • 4D resting fMRI file (rename it with its subject name and ‘fMRI_resting’)

  • 4D first stimulation fMRI file (rename it with its subject name and ‘fMRI_1st_stimulation’)

  • 4D second stimulation fMRI file (rename it with its subject name and ‘fMRI_2nd_stimulation’)

DTI

  • 82 3D DTI nifti files

    • copy and paste the 4D DWI file from the clean folder into this folder and convert it to 82 3D files in CSPM → Image → Convert 4D nifti to 3D

    • create a ‘clean’ subfolder and copy the 82 3D DTI images into this folder

fMRI_resting

  • 136 3D fMRI nifti files

    • copy and paste the 4D resting fMRI file from the clean folder into this folder and convert it to 136 3D files in CSPM → Image → Convert 4D nifti to 3D

    • create a ‘clean’ subfolder and copy the 136 3D fMRI images into this folder

fMRI_1st_stimulation

same as above, but using the 4D first stimulation fMRI file

fMRI_2nd_stimulation

same as above, but using the 4D second stimulation fMRI file

headers

  • the ‘header’ i.e. JSON file of the nifti Bruker Field Map (i.e. the file directly above the Bruker Field Map in your ‘Converted Data’ folder

  • the ‘header’ i.e. JSON file of the 4D DWI image (i.e. the file directly above the 4D DWI image in your ‘Converted Data’ folder)

    • open the JSON file and check that the ‘SpinEchoTime’ is 0.24 and the ‘SliceThickness’ is 0.323.

  • the ‘header’ i.e. JSON file of the 4D resting fMRI image (i.e. the file directly above the 4D resting fMRI image in your ‘Converted Data’ folder)

    • open the JSON file and check that the ‘SpinEchoTime’ is 0.2112 and the ‘SliceThickness’ is 0.5.

  • the ‘header’ i.e. JSON file of the 4D 1st stimulation fMRI image (i.e. the file directly above the 4D 1st stimulation image in your ‘Converted Data’ folder)

    • open the JSON file and check that the ‘SpinEchoTime’ is 0.2112 and the ‘SliceThickness’ is 0.5.

  • the ‘header’ i.e. JSON file of the 4D 2nd stimulation fMRI image (i.e. the file directly above the 4D 2nd stimulation image in your ‘Converted Data’ folder)

    • open the JSON file and check that the ‘SpinEchoTime’ is 0.2112 and the ‘SliceThickness’ is 0.5.

  1. In SPM12, open the ‘FieldMap’ GUI:

Screenshot 2024-05-21 143538.jpg
  1. Click the ‘Load’ button next to ‘Precalculated field map’ and copy in the file path of one of the subject’s folders in your ‘Distortion Correction' folder, and select the subject’s ‘fpm.img’ file. It will appear to the right, as highlighted in the below example, and a ‘vdm5_fpm.img’ file will be created in the subject’s folder.

Screenshot 2024-05-21 143709.jpg
  1. Select the parameters ‘No’, ‘-ve’ and ‘No’ for ‘EPI-based field map’, ‘Polarity of phase-encode blips’ and ‘Apply Jacobian modulation’, respectively. The formula to work out the ‘Total EPI readout time’ is Spin Echo Time x (k-space + 1). For the data in this example, the ‘Total EPI readout time’ is 9.84 ms for the DTI and 13.5168 ms for fMRI.

  2. Click the ‘Load EPI image’ and select your 4D DWI file from the subject’s ‘clean’ folder (ignore the error message).

  3. Click the ‘Write unwarped’ button. This will create a mean unwarped image in your clean folder, with the prefix 'u'.

  4. Visually inspect the ‘u' image for correction of spatial distortion by comparing it to the original 4D DWI image. It should no longer appear to be distorted. For example, below you can see that the cerebellum looks far less squashed in the second distortion corrected-image (i.e. the 'u’ image), compared to the original image.

Screenshot 2024-05-21 145321.jpg
  1. To apply these distortion correction parameters to all of the 82 DTI images =, open SPM12 → ‘Realign and unwarp’.

Screenshot 2024-05-21 145659.jpg
  1. Select the 82 DTI files from the ‘DTI’ folder in the subject’s folder. Enter that subject’s ‘vdm5_fpm.img’ file in the ‘Phase map’ box and the distortion corrected ‘u' image in the 'Weighting’ box, along with the following parameters which are highlighted below.

Screenshot 2024-05-21 145945.jpg
  1. Save the batch to the subject’s DTI folder and click run (i.e. the green triangle icon in the top left hand corner). This will create 82 distortion corrected DTI images in the subject’s DTI folder (with a 'u' prefix).

  2. Copy the 82 distortion corrected DTI images (i.e. those with a ‘u' prefix) into the subject’s ‘raw’ folder in projects\CONTROL\*subject name*\DTI.

  3. Repeat steps 9-16 for the resting fMRI, first stimulation fMRI and second stimulation fMRI of that subject, using with the following parameters:

Screenshot 2024-05-21 151425.jpgScreenshot 2024-05-21 152110.jpg
  1. Repeat DTI and fMRI distortion correction on all subjects. Note that even if only some of your subjects have distorted DTI/fMRI images, you must still perform distortion correction on all subjects in your dataset.

  2. You are now ready to resume with the steps outlined in the ‘File/Folder Setup and Preparation for Preprocessing’ page, and then continue onto the instructions in the ‘Preclinical Preprocessing’ page.

  • No labels