Hey guys, in this video I wanted to go over how to do hippocampal subfield segmentation in freesurfer
version 6.0. I, a couple months ago, made a video about hippocampal subfield segmentation
for the older version of freesurfer, which was freesurfer 5.3 and that's the first version that
introduced hippocampal subfield segmentation. In the video, I talked about how they were going to
update it soon with freesurfer 6.0 but at that time the newer version was not made available.
This is just kind of like an update video and I do recommend that if you're watching the video
now that you do update your freesurfer version at least for hippocampal subfield segmentation
because this one is more accurate. And what you have to do for the 6.0 version is a little bit
different from the 5.3 version. I'm gonna go over that in this video although it's not that much
more work than the older version. And I will put a link to this particular freesurfer page so you
can follow along. I'm basically just going to go along with this tutorial page in this video. This
first part is basically comparing freesurfer 6.0 to the 5.3 version for the subfield segmentation.
It says basically that this newer version is a lot more accurate and it's better to get the
correct volumes if you're going to do a numeric analysis with the data. With this newer version,
you can also use an additional scan when you're segmenting the subfields. If you have one
T1-weighted image, you can also add a T2 it says, although it doesn't necessarily have to be a T2,
it can just be any additional scan and you can include that with the flag for running
this hippocampal subfield segmentation. If you have a T1 and T2 you can use both those images
and it will end up more accurate or even if you just have two T1s but one is maybe more
high-resolution of the hippocampus, you can use that as well. Or if you just have a T1,
you can still run this with just that one image as well. That's what I'm going to demo in this
video and okay. The second difference is that for the 6.0 version you do need to have what's called
the MATLAB R2012 runtime. Downloading the runtime is free and if you click this page, it will give
you a whole explanation of how to download this particular runtime. If you have any other version
of MATLAB, it does have to be this particular 2012 B version. If you already have MATLAB, you
still do have to download this but it's very quick and it's free and it explains how to do it in the
command line in that page but that is something that this version uses. Okay, so let me go now to
actually demoing it. There's a mode A and a mode B. The mode B is if you want to include additional
scans with the segmentation. If you have a T1 and a T2, you would do mode B or if you have a T1 and
a higher-resolution T2--or a higher-resolution T1 as the additional scan, you can read this mode B
section to figure out how to run the hippocampal subfields using the additional scans. I'm just
going to do this one. This will produce 6 output files and you either run this line or this line
depending on if your subject has already gone through the autorecon pre-processing stages.
If you have a subject and you haven't done any analysis on them at all, you're going to include
the recon-all and then the additional all flag. It will run through everything: autorecon 1,
2, and 3, and then it will do the hippocampal subfield segmentation in addition to that. For me,
I'm going to use the second line because I have subjects in my subjects folder that I have already
processed or pre-processed so I'm just going to run an additional processing for the hippocampal
subfields. And actually I did that already but I will show you again. This is my subjects folder
and I have this subject folder called TYR3T1mmMP2 so that's a one millimeter MP2rage. That already
has been run with autorecon-all --all and I actually already did run the hippocampal
subfield but I'll just show you what it would be. You do recon-all like it says and then -s
for the name of the subjects folder. I'm going to put in the name of the folder as its seen
in my subjects folder. That's capital TYR3T1mmMP2 for me and then you just add the additional flag,
which is -hippocampal-subfields-T1. This does not run in the normal recon-all -all,
you have to specifically flag for it to run hippocampal subfields T1. If I clicked enter, then
that would run. Let me show you the recon-all log because I already ran that. If I go to scripts,
recon-all log, it will show that it finished without error. I did this earlier today. It took
about 36 minutes. I think from what I remember, the freesurfer 5.3 version took about 20 minutes,
so it's not that much more difference in time. It's pretty quick to run it. Thirty minutes it's
not that long and this version again is supposedly more accurate to use. Okay, so once that's done
running, it will change your MRI folder in your subjects folder. If I go to my MRI folder and
I look at the last files created, it creates these six files: three for the left hemisphere
and three for the right. And it also says down here that you can view what it's considering
the different subfields. If you want to kind of look at whether it looks accurate or not,
you can look at it through freeview. To use this command, you have to--when you open your terminal
window--you have to first cd to your subjects MRI directory. I already did that as well in another
window. Let me see if I have that. Here I cd'd to this MRI folder in the terminal window and then
you just copy and paste this command exactly as you see it and that will open up freeview.
I have this open already. This is what it will look like. On my particular subject,
this is how the hippocampal subfields look. It does look a little bit different from the 5.3
version. Let me see if I can scroll through there and that's what it looks like. And you can read
what the labels are on the left hand side. And another thing that this does is give you numeric
data that you can look at with this little bash script. You have to read this and the script,
what you have to type in depends on whether you use mode A or mode B. I did that as well
here. For me, all I had to do was put in T1. If you do mode B, you have to do T1 dash and
then this style of analysis that you used and then you put in the name of what you want the
output file to be. The output file can be a text file. I just named it hippotest dot txt
and I have already set my subject directory in the terminal window when I open it,
so I don't have to add anything else. If you do that, it will produce an output file that has the
volumetric data. Let me show you what it produced. Okay so that has all the data smushed together and
if you import that into an excel sheet, it will just be value separated by spaces. Text file
import the hippotest and then I did separate it by spaces and that will give you the values for
the left and right subfields and also the total hippocampal volumes for your data. All right so
I kind of--I wanted to compare this same file running the 5.3 version and the 6.0 version but
I honestly don't have the 5.3 version downloaded on my computer anymore and I was too lazy to
download it again just for the video but based on what it says in the web page I would use the
6.0 version. If you're looking in my neuroimaging playlist and you see this video, I would use this
updated version rather than the older version and I'll try to make a note of that in the older
video as well to use this one. Anyway, that's it for this video and thank you guys for watching.
*chiptune music*