Important Announcement from Andy's Brain Blog

Even though I assume that the readers of this blog are a small circle of loyal fanatics willing to keep checking in on this site even after I haven't posted for months, and although I have generally treated them with the same degree of interest I would give a Tupperware container filled with armpit hair, even they are entitled to a video update that features me sitting smugly with a cheesy rictus pasted on my face as I list off several of my undeserved accomplishments, as well as giving a thorough explanation for my long absence, and why I haven't posted any truly useful information in about a year. (Hint: It starts with a "d", and rhymes with "missertation.")

Well, the wait is over! Here it is, complete with a new logo and piano music looping softly in the background that kind of sounds like Coldplay!



For those of you who don't have the patience to sit through the video (although you might learn a thing or two about drawing ROIs with fslmaths, which I may or may not have covered a while back), here are the bullet points:


  • After several long months, I have finished my dissertation. It has been proofread, edited, converted into a PDF, and sent out to my committee where it will be promptly filed away and only skimmed through furiously on the day of my defense, where I will be grilled on tough issues such as why my Acknowledgements section includes names like Jake & Amir.
  • A few months ago I was offered, and I accepted, a postdoctoral position at Haskins Laboratories at Yale. (Although technically an independent, private research institution, it includes the name Yale in its web address, so whenever anybody asks where I will be working, I just say "Yale." This has the double effect of being deliberately misleading and making me seem far more intelligent than I am.) I recently traveled out there to meet the people I would be working with, took a tour of the lab, walked around New Haven, sang karaoke, and purchased a shotgun and a Rottweiler for personal safety reasons. Well, the Rottweiler more because I'll be pretty lonely once I get out there, and I need someone to talk to.
  • When I looked at the amount of money I would be paid for this new position, I couldn't believe it. Then when I looked at the amount of money I would be paying for rent, transportation, excess nosehair taxes (only in a state like Connecticut), shotgun ammunition, and dog food, I also couldn't believe it. Bottom line is, my finances will not change considerably once I move.
  • A new logo for the site has been designed by loyal fanatic reader Kyle Dunovan who made it out of the goodness of his heart, and possibly because he is banking on bigtime royalties once we set up an online shop with coffee mugs and t-shirts. In any case, I think it perfectly captures the vibe of the blog - stylish, cool, sleek, sophisticated, red, blue, green, and Greek.
  • Lastly, I promise - for real, this time, unlike all of those other times - to be posting some cool new techniques and tools you can use, such as slice analysis, leave-one-out analysis, and k-means clustering (as soon as I figure that last one out). Once I move to Connecticut the focus will probably shift to more big data techniques, with a renewed emphasis on online databases, similar to previous posts using the ABIDE dataset.
  • I hope to catch up on some major backlogging with emails, both on the blog and on the Youtube channel. However, I can't promise that I will get to all of them (and there are a LOT). One heartening development is that more readers are commenting on other questions and posts, and helping each other out. I hope that the community continues to grow like this, which will be further bonded through coffee mugs and t-shirts with the brain blog logo on it.

Combining ROIs

Once you've used a tool like fslmaths, 3dcalc, or Marsbar to create a single ROI, you can combine several of these ROIs using the same tools. This might be useful, for example, when creating a larger-scale masks encompassing several different areas.

In each case, combining ROIs is simply a matter of creating new images using a calculator-like tool; think of your TI-83 from the good old days, minus those frustrating yet addictive games such as FallDown. (Personal record: 1083.) With fslmaths, use the -add flag to concatenate several different ROIs together, e.g.:

fslmaths roi1 -add roi2 -add roi3 outputfile

With AFNI:

3dcalc -a roi1 -b roi2 -c roi3 -expr '(a+b+c)' -prefix outputfile

With Marsbar is a bit more involved, but also easier since you can do it from the GUI, as shown in the following video.




Many thanks to alert reader Anonymous, who is both too cool to register a username and once scored a 1362 on FallDown. Now all you gotta do is lay back and wait for the babe stampede!

FSL Tutorial: Creating ROIs from Coordinates

Previously we covered how to create regions of interest (ROIs) using both functional contrasts and anatomical landmarks; however, FSL can also create spheres around voxel coordinates, similar to AFNI's 3dcalc or SPM's marsbar.

  1. Step one is to find the corresponding voxel coordinates for your MNI coordinates, which may be based on peak voxel activation from another study, for example; to do this, open up FSLview, type in your MNI coordinates, and write down the corresponding voxel coordinates (these are shown in the bottom-left corner of FSLview). 
  2. After you have written down your voxel coordinates, create a point at those coordinates using the fslmaths command. This command requires the template space that you warped to, as well as the actual x-, y-, and z-coordinates corresponding to the MNI coordinates. Give the output file a name, and make sure that the output data type ('odt') is set to float. (Example command: fslmaths avg152T1.nii.gz -mul 0 -add 1 -roi 45 1 74 1 51 1 0 1 ACCpoint -odt float)
  3. Using fslmaths again, input the file containing the point created in the previous step, and specify a sphere of radius N (in millimeters) to expand around that point. Use the -fmean command, for reasons that are to remain mysterious, and provide a label for your output data set. (Example command: fslmaths ACCpoint -kernel sphere 5 -fmean ACCsphere -odt float)
  4. Update on 5/18/2016: To make it a binary mask, execute one more command: fslmaths ACCsphere.nii.gz -bin ACCsphere_bin.nii.gz. The previous step creates a sphere, but with small intensities; this can be problematic if you do a featquery analysis that allows weighting of the image.

Once that is all done, use fslview to open up a template in your normalized space, and overlay your newly created sphere; double-check to make sure that it is in roughly the location where you think it should be. Now you can extract data such as parameter estimates from this ROI, using techniques similar to those covered in previous tutorials about ROIs.

Thanks to alert viewer danieldickstein, which, due to its juvenile reference to the male member, cannot possibly be his real name. Grow up, Daniel.