ReHo Normalization with FSL

As a brief addendum to the previous post, ReHo maps can also be normalized using FSL tools instead of 3dcalc. Conceptually, it is identical to what was discussed previously; however, the ability to set variables as the output of FSL commands makes it more flexible for shell scripting. For example, using the same datasets as before, we could set the mean and standard deviation to variables using the following combination of AFNI and FSL commands:

3dAFNItoNIFTI ReHo_Test_Mask+tlrc
3dAFNItoNIFTI mask_group+tlrc

setenv meanReHo `fslstats ReHo_Test_Mask.nii -M`
setenv stdReHo `fslstats ReHo_Test_Mask.nii -S`
fslmaths ReHo_Test_Mask.nii -sub $meanReHo -div $stdReHo -mul mask_group.nii ReHo_Norm
gunzip *.gz
3dcopy ReHo_Norm.nii ReHo_Norm

An explanation of these commands is outlined in the video below. Also, suits!

SPM: Setting the Origin and Normalization (Feat. Chad)

Of all the preprocessing steps in FMRI data, normalization is most susceptible to errors, failure, mistakes, madness, and demonic possession. This step involves the application of warps (just another term for transformations) of your anatomical and functional datasets in order to match a standardized space; in other words, all of your images will be squarely placed within a bounding box that has the same dimensions for each image, and each image will be oriented similarly.

To visualize this, imagine that you have twenty individual shoes - possibly, those single shoes you find discarded along the highways of America - each corresponding to an individual anatomical image. You also have a shoe box, corresponding to the standardized space, or template. Now, some of the shoes are big, some are small, and some have bizarre contours which prevent their fitting comfortably in the box.

However, due to a perverted Procrustean desire, you want all of those shoes to fit inside the box exactly; each shoe should have the toe and heel just touching the front and back of the box, and the sides of the shoes should barely graze the cardboard. If a particular shoe does not fit these requirements, you make it fit; excess length is hacked off*, while smaller footwear is stretched to the boundaries; extra rubber on the soles is either filed down or padded, until the shoe fits inside the box perfectly; and the resulting shoes, while bearing little similarity to their original shape, will all be roughly the same size.

This, in a nutshell, is what happens during normalization. However, it can easily fail and lead to wonky-looking normalized brains, usually with abnormal skewing of a particular dimension. This can often by explained by a faulty starting location, which can then lead to getting trapped in what is called a local minimum.

To visualize this concept, imagine a boulder rolling down valleys. The lowest point that the boulder can fall into represents the best solution; the boulder - named Chad - is happiest when he is at the lowest point he can find. However, there are several dips and dells and dales and swales that Chad can roll into, and if he doesn't search around far enough, he may imagine himself to be in the lowest place in the valley - even if that is not necessarily the case. In the picture below, let's say that Chad starts between points A and B; if he looks at the two options, he chooses B, since it is lower, and Chad is therefore happier. However, Chad, in his shortsightedness, has failed to look beyond those two options and descry option C, which in truth is the lowest point of all the valleys.

This represents a faulty starting position; and although Chad could extend the range of his search, the range of his gaze, and behold all of the options underneath the pandemonium of the dying sun, this would take far longer. Think of this as corresponding to the search space; expanding this space requires more computing time, which is undesirable.

To mitigate this problem, we can give Chad a hand by placing him in a location where he is more likely to find the optimal solution. For example, let us place Chad closer to C - conceivably, even within C itself - and he will find it much easier to roll his rotund, rocky little body into the soft, warm, womb-like crater of option C, and thus obtain a boulder's beggar's bliss.

(For the mathematically inclined, the contours of the valley represent the cost function; the boulder represents the cost function ratio between the source image and the template image; and each letter (A, B, and C) represents a possible minimum in the cost function.)

As with Chad, so with your anatomical images. It is well for the neuroimager to know that the origin (i.e., coordinates 0,0,0) of both Talairach and MNI space is roughly located at the anterior commissure of the brain; therefore, it behooves you to set the origins of your anatomical images to the anterior commissure as well. The following tutorial will show you how to do this in SPM, where this technique is most important:

Once we have successfully warped our anatomical image to a template space, the reason for coregistration becomes apparent: Since our T2-weighted functional images were in roughly the same space as the anatomical image, we can apply the same warps used on the anatomical image to the functional images. This is where the "Other Images" option comes into play in the SPM interface.

As always, check your registration. Then, check it again. Then, ask someone else to check it. (This is a great way to meet girls.) In particular, check to make sure that the internal structures (such as the ventricles) are properly aligned between the template image and your warped images; matching the internal variability of the template image is much trickier, and therefore much more susceptible to failure - even if the outer boundaries of the brain look as though they match up.

*Actually, it's more accurate to say that it is compressed. However, once I started with the Procrustean thing, I just had to roll with it.

FSL Tutorial 2: FEAT (Part 3): For The Wind

Pictured: FSL User
[Before we begin: According to my traffic sources, the majority of my viewers, outside of the United States, are from Russia. If the history books I have read and the video games I have played are any guide, they are probably visiting this site in order to learn enough about cognitive neuroscience to produce some kind of supersoldier in order to restore communist hardliners to power and launch an assault on America. So, to all of my Russian readers: Hola!]

Finally, we have arrived at the end of the FEAT interface. The last two tabs, post-stats and registration, allow the user to specify how the results will be visualized, what kinds of multiple comparison corrections to carry out, and how to register and normalize the data.

One might wonder why FSL chooses to perform coregistration and normalization as the last step, instead of at a previous step in the preprocessing pipeline as do other software analysis packages. The reasoning is that because these steps introduce spatial correlations, it is better to introduce them after having run the statistical analysis, in order to prevent any sort of biases that may be introduced into the data as a result of applying these steps. Personally, I don't think it matters that much either way, since you have to do it at some point; however, that is the way it is built into the FSL stream, and if you don't like it, tough bananas.

Most of the defaults are fine; the only tab that requires any input before you can move forward is the Registration tab, which requires a skullstripped brain to normalize to a standardized space. This includes atlases such as Talairach or Montreal Neurological Institute (MNI), although I believe FSL only uses MNI. The point of normalization is that every subject's brain will be twisted, rotated, warped, and undergo various other uncomfortable transformations until it is located within a box that has equal dimensions to the standard space. Furthermore, certain anatomical landmarks will be at a specific coordinate position relative to every other part of the brain; for example, in Talairach space, the anterior commissure - a bundle of nerve fibers connecting the hemispheres, located at the base of the anterior columns of the fornix - will be positioned at coordinates 0, 0, 0. Thus, according to the Talairach atlas in this example, any other brain regions can be defined based on their distance from this origin (although the researcher should always check to make sure that what the atlas says matches up with what is directly in front of him).

A couple of other useful options are in the post-stats tab. For example, Pre-threshold masking allows the user to perform region of interest (ROI) analyses which define an a priori region either based on anatomical regions defined by an atlas or a binary mask generated by a program like Marsbar. Contrast masking has a similar role, masking out certain regions of the brain based on whether they are covered by another contrast in the analysis; although caution should be exercised here as well, in order to make sure that the masking contrast is orthogonal to the one being investigated. For more information about ROI analyses, as well as potential pitfalls, see an earlier post about the topic.

More tutorials will be up soon to guide the user through what all those HTML output files mean, as well as looking at and interpreting results.