• Blog
  • About
  • Publications
  • Videos
  • Workshops
  • CV
  • Contact Me
  • Hall of Fame
Menu

Andy's Brain Blog

Street Address
City, State, Zip
Phone Number
fMRI, Neuroimaging, and More

fmri, neuroimaging, and more

Andy's Brain Blog

  • Blog
  • About
  • Publications
  • Videos
  • Workshops
  • CV
  • Contact Me
  • Hall of Fame

Reverse Normalization of fMRI Data

May 13, 2017 Andrew Jahn

Normalization - the transforming of data to a standardized space - is a common preprocessing step, and for good reason: it allows us to perform group analysis; it reduces variability in the size and shape of the brain images; and it allows for comparisons across studies by putting the data into a standardized space. Five millimeters to the left and ten millimeters to the rear of the anterior commissure then becomes the same location from one study to the next.

For all these advantages, there may be a time where you want to do the opposite - take an image in standardized space and transform it back into subject space (also called "native" space). One example is using atlas-based ROIs on individual subjects, instead of on a group-level image. For example, you may be doing a case study on a patient, and you may wish to extract data in native space from a prefrontal ROI based on the Talairach atlas. Or, perhaps you want to use a group-level mask on each subject's non-normalized data.

In either case, you still need to normalize your data to standardized space. This step creates a transformation file - a matrix of numbers representing how much to shift the voxels in the x-, y-, and z-directions to best match the standard template. Applying the inverse of this matrix transforms data from standardized space to native space.

In FSL, these inverted matrices are generated as part of the normalization step and put in the "reg" directory in each subject's "feat" directory. The inversion matrix specifying the transform from standardized space to native space is in the file standard2example_func.mat. After you've created an ROI in standardized space, use a command like the following:

flirt -in standardized_ROI.nii.gz -ref example_func.nii.gz -init standard2example_func.mat -applyxfm -out ROI_standard2native.nii.gz

The method of reverse normalization is similar in AFNI, although the inverse matrix is not generated as a separate file. Instead, you need to use the warp matrix stored in the header of a normalized image using the cat_matvec command:

cat_matvec -ONELINE warped_Image+tlrc::WARP_DATA > warp_Matrix.1D

This file is used with any of AFNI's linear transformation tools - here, I use 3dAllineate - by specifying the native-space image as the space we are transforming the standardized image to:

3dAllineate -1Dmatrix_apply warp_Matrix.1D -prefix warped_Image2native+orig -source warped_Image+tlrc -master native_Image+orig

Linear transform commands are useful tools for not only warping to normalized space, but to any space you want; and the more you experiment with these transforms, the more flexible and powerful they will become in your hands. Cases are rare where you would need to use reverse normalization, but the ability to do so, and knowing when you would need to do so, will make you a stronger researcher.

← Introduction to E-PrimeExtracting Timecourses with 3dmaskdump →
Archive
  • September 2024
  • June 2024
  • March 2024
  • January 2024
  • June 2023
  • May 2023
  • April 2023
  • February 2022
  • January 2022
  • January 2021
  • December 2020
  • April 2020
  • December 2018
  • April 2018
  • January 2018
  • December 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • January 2017
  • November 2016
  • August 2016
  • July 2016
  • February 2016
  • January 2016
  • September 2015
  • August 2015
  • July 2015
  • May 2015
  • April 2015
  • December 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014
  • January 2014
  • December 2013
  • November 2013
  • October 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012
  • August 2012
  • July 2012
  • June 2012
  • April 2012
  • March 2012

What's on Andy's Brain this month?

Connect with Andy!

Powered by Squarespace