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.