Once you finish processing your data through iBEAT, you will have a labeled brain that has a file name ending in “reoriented-strip-seg-aal.img” This file contains 90 regions from the AAL atlas.
I have brought this file into FSL to calculate volume of each labeled region. First, you will need to use mri_convert or fslchfiletype to convert the .img and .hdr (analyze format) files to .nii (NIFIT format) files. I used mri_convert –in_type analyze –out_type nii <filename from iBEAT> <output filename for FSL>
Next, you can get the volume for each region in the file using fslstats. The regions are numbered 1-90, so the easiest way I found to do this is to set the lower and upper limits around each number (e.g., lower limit = 0.1, upper limit = 1.1 to give you the value for region 1). You can use any lower and upper limits that you choose as long as they include only the value of a single region (e.g., don’t choose lower limit = 0.1, upper limit = 10.1 because that will include regions 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10).
The code I used was:
fslstats -l 0.1 -u 1.1 S001-01-reoriented-strip-seg-aal.nii -V >> S001-01-volume.txt
-l specifies the lower limit
-u specifies the upper limit
-V outputs the volume and voxels of the region within the limit
>> tells FSL to add the output to a text file without overwriting what is already in the text file. This is useful for putting together a list of the volume measures across all 90 regions.
I then repeated the code for each of the 90 regions. Then I repeated for each subject, sending the output for each subject to a new file. I checked after running the code for each subject that the text file contained 90 lines of output. If not, I would delete the text file and start over. If you are worried about losing track of the information in the text file, you can add a line like this:
echo region1 >> S001-01-volume.txt
before the code for region 1. This will add a line to your text file that just says “region1.” If you want to put all of your subjects in a single file, you could also use the echo command to add the subject ID to the text file (e.g., echo S001 >> all_subs_volume.txt).
This step is not difficult, but it is important that you keep your code and output organized to make sure that you don’t accidentally set your lower and upper bounds incorrectly. FSL will not catch these mistakes, and if you don’t keep track of what you are typing and outputting into the text file, you could end up with numbers that do not represent the volume in the AAL region that you think they do.
When I ran this code, I opened a text file, typed this code 90 times:
fslstats -l 0.1 -u 1.1 S001-01-reoriented-strip-seg-aal.nii -V >> S001-01-volume.txt
I went through and changed the upper and lower limit of each line up to -l 89.1 -u 90.1, then checked and double checked that the numbers were correct.
Once I ran that block of code for one subject, I used the find and replace option in the text file to replace all of the instances of S001 to S002. I repeated this through all of the subjects.
**I believe it should be possible to use a for or while loop to do the same thing, however, I was running the code in csh, and I could not find a straightforward way to create a looping variable that was a non-integer (e.g., 0.1 or 1.1 to loop through the -l and -u options). It could save you time and worry if you could loop through the 90 regions rather than checking and double checking that the lower and upper limits are set correctly.