Differences between revisions 14 and 15
Revision 14 as of 2011-03-16 16:29:20
Size: 5809
Editor: MartinReuter
Comment:
Revision 15 as of 2011-03-16 16:33:07
Size: 6392
Editor: MartinReuter
Comment:
Deletions are marked like this. Additions are marked like this.
Line 94: Line 94:
Now it is time to look at the longitudinal results. Since FreeSurfer 5.1 the base and the long runs are all in the same voxels space, therefore images will be registered and can be directly compared if opened on top of each other:
{{{
freeview (open both time points and surfaces (and annotations, labels ...?)
}}}
or tkmedit:
{{{
Line 95: Line 101:
}}}
note that tkmedit cannot open more than 2 images, therefore we recommend freeview.

You can see the ....(surfs, annot,labels...)
Also switch back and forth between the images by pressing ???. to directly see any longitudinal change.
Line 98: Line 109:

top | previous

Longitudinal Processing - Tutorial

This page will take you through the steps of processing your longitudinal data: first with running the cross sectionals and creating the unbiased within-subject base and longitudinals. Then we will take a look at the results, learn how to do some post-processing and about editing the data and rerunning the different streams with the new edits. You can read more about the longitudinal stream at LongitudinalProcessing and about edits at LongitudinalEdits.

Preparations

If you are taking one of the formally organized courses, the tutorial data is already installed on the computer provided to you so please skip ahead to the Viewing Volumes with Tkmedit section. If not, then to follow this exercise exactly be sure you've downloaded the tutorial data set before you begin. If you choose not to download the data set you can follow these instructions on your own data, but you will have to substitute your own specific paths and subject names. If you are using the tutorial data please set the environmental variable TUTORIAL_DATA to the location that you have downloaded the data to (here, it has been copied to $FREESURFER_HOME/subjects):

tcsh
setenv TUTORIAL_DATA $FREESURFER_HOME/subjects/buckner_data/tutorial_subjs

Notice the command to open tcsh. If you are already running the tcsh command shell, then the 'tcsh' command is not necessary.

First you need to set your SUBJECTS_DIR to the appropriate place:

setenv SUBJECTS_DIR $TUTORIAL_DATA
cd $SUBJECTS_DIR

this will set your SUBJECTS_DIR to the location where your tutorial data is if you have defined the variable TUTORIAL_DATA as indicated at the top of this tutorial. If you are not using the tutorial data you should set your SUBJECTS_DIR to the directory in which the subject you will use for this tutorial is located.

Alternatively you can set SUBJECTS_DIR to the directory where your cross sectionals reside (the different time points for each subject). And don't forget to source FREESURFER.

cd /path/to/your/data
setenv SUBJECTS_DIR $PWD
source $FREESURFER_HOME


Creating Longitudinal Data

Processing your data currently consists of three steps:

First, run all your cross sectionals. Run recon-all -all for all tpNs (i.e. all time points for all subjects):

recon-all -subjid <tpNid> -all

Second, create your template/base from the tpNs. Here you can choose a name for the templateID, e.g. 'bert' or 'bert_base' if 'bert' is already used for the first time point of this subject:

recon-all -base <templateID> -tp <tp1id> -tp <tp2id> ... -all

Finally, create the longitudinals using the template and tpNs. Repeat the following steps for all tpNs. The resulting directories will be in the format of tp1id.long.templateID

recon-all -long <tpNid> <templateID> -all

So for example for a subject with two time points OAS2_0001_MR1 and OAS2_0001_MR2 you would run:

recon-all -subjid OAS2_0001_MR1 -all 
recon-all -subjid OAS2_0001_MR2 -all

(here you can specify -i path/to/dicomfile -i ... to import dicoms, if the input is not available in OAS2_0001_MR1/mri/orig/001.mgz ... see ??HOWTORUNDATA???). We call these runs the cross sectionals (or cross runs) because the two time points are processed completely independently as if they were from different subjects.

Once the norm.mgz is available on both time points, you can create the unbiased template/base. We will call it OAS2_0001 :

recon-all -base OAS2_0001 -tp OAS2_0001_MR1 -tp OAS2_0001_MR2 -all

This will create the within-subject template (we will call it the base) and run it through recon-all (so it will take approximately the same time as a regular recon-all run). A directory OAS2_0001 will be created.

Finally once the base and the two cross sectionally processed time points are fully completed, you can run the longitudinal runs:

recon-all -long OAS2_0001_MR1 OAS2_0001 -all
recon-all -long OAS2_0001_MR2 OAS2_0001 -all

These runs will create the directories OAS2_0001_MR1.long.OAS2_0001 and OAS2_0001_MR2.long.OAS2_0001 containing the final results. These are complete subjects directories and we will use them for any postprocessing or analysis as the results are more sensitive and repeatable than the independent cross runs. These longitudinal processes will run much faster than the cross and base runs above. We call them the long runs, because they make use of common information taken from the template.


Inspecting Longitudinal Data

Once your results are there, you can take a look at different things. First let's check the base. Open the norm.mgz into freeview (or old-fashioned tkmedit):

freeview -v OAS2_0001/mri/norm.mgz -f OAS2_0001/surf/lh.pial:edgecolor=blue OAS2_0001/surf/rh.pial:edgecolor=blue OAS2_0001/surf/lh.white:edgecolor=red OAS2_ooo1/surf/rh.white:edgecolor=red

(IS THERE A SHORT WAY OF CALLING THIS WITH FREEVIEW???)

or old-fashioned tkmedit:

tkmedit OAS2_0001 norm --surfs

This will show you a synthesized image, basically the average anatomy of this subject across time. If the across-time registration failed you would see a blurry image or ghosts (usually never happens, but if it does, report it). You can also inspect the surfaces on the average anatomy. This will be important later in case of edits as the surfaces are transferred into the longitudinal runs and therefore should be accurate in the base.

Now it is time to look at the longitudinal results. Since FreeSurfer 5.1 the base and the long runs are all in the same voxels space, therefore images will be registered and can be directly compared if opened on top of each other:

freeview (open both time points and surfaces (and annotations, labels ...?)

or tkmedit:

note that tkmedit cannot open more than 2 images, therefore we recommend freeview.

You can see the ....(surfs, annot,labels...) Also switch back and forth between the images by pressing ???. to directly see any longitudinal change.


Post-Processing Longitudinal Data


Editing Longitudinal Data


MartinReuter

FsTutorial/LongitudinalTutorial_tktools (last edited 2013-11-01 14:33:07 by MaritzaEbling)