|
Size: 2571
Comment: new
|
Size: 3726
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 1: | Line 1: |
| [wiki:Self:DownloadAndInstall top] | [wiki:Self:SetupConfiguration previous] | [[DownloadAndInstall|top]] | [[SetupConfiguration|previous]] |
| Line 5: | Line 5: |
| == tkmedit == | There is a sample subject, called 'bert', found in the freesurfer/subjects directory, which contains pre-processed data stored in .mgz files. |
| Line 7: | Line 7: |
| There is a sample subject, called 'bert', found in the freesurfer/subjects directory, which contains pre-processed data stored in .mgz files (not in COR formatted files, which is a deprecated format). | == freeview (volume & surface viewer) == {{{ freeview -v $SUBJECTS_DIR/bert/mri/brainmask.mgz -v $SUBJECTS_DIR/bert/mri/aseg.mgz:colormap=lut:opacity=0.2 -f $SUBJECTS_DIR/bert/surf/lh.white:edgecolor=yellow -f $SUBJECTS_DIR/bert/surf/rh.white:edgecolor=yellow -f $SUBJECTS_DIR/bert/surf/lh.pial:annot=aparc:edgecolor=red -f $SUBJECTS_DIR/bert/surf/rh.pial:annot=aparc:edgecolor=red }}} == tkmedit (volume viewer) == |
| Line 15: | Line 21: |
| tkmedit -segmentation mri/aseg.mgz $FREESURFER_HOME/FreeSurferColorLUT.txt bert norm.mgz | tkmedit bert norm.mgz -segmentation aseg.mgz $FREESURFER_HOME/FreeSurferColorLUT.txt |
| Line 17: | Line 23: |
| Note: you may need to include 'mri/' in the aseg.mgz path shown above on older versions of tkmedit. |
|
| Line 19: | Line 27: |
| == tksurfer == | == tksurfer (surface viewer) == |
| Line 37: | Line 45: |
| == qdec == To start the qdec application, type: {{{ qdec }}} There is no sample data with which to test it, so you should just confirm that the application starts without displaying any error messages. |
|
| Line 41: | Line 57: |
| recon-all --help | recon-all --help | less |
| Line 45: | Line 61: |
| == recon-all -autorecon-all == | == recon-all -all == |
| Line 47: | Line 63: |
| To re-create all volume and surface files, on the | To re-create all volume and surface files, on the |
| Line 50: | Line 66: |
| recon-all -autorecon-all -subjid bert | recon-all -s bert -all }}} If you get a permission error type the following: {{{ sudo chmod -R a+w $FREESURFER_HOME/subjects/bert recon-all -s bert -all |
| Line 54: | Line 76: |
| multi-stage processing (eg. -autorecon1, -autorecon2 and -autorecon3). | multi-stage processing (eg. -autorecon1, -autorecon2 and -autorecon3). The -autorecon1 stage completes in less than a half an hour, and is worth running to test your installation, as it exercises most of the libraries. To run, type: {{{ recon-all -s bert -autorecon1 }}} |
| Line 58: | Line 83: |
| Given a subject having three sets of DICOMS (three runs of structural scans), do the following to setup a subject, where <subjid> is replaced with whatever name or id you want to give to that subject: |
Given a subject having two sets of DICOMS (two runs of structural scans), do the following to setup a subject, where <subjid> is replaced with whatever name or id you want to give to that subject and SUBJECTS_DIR is set to the directory where you want to keep your subjects: |
| Line 62: | Line 85: |
| cd $SUBJECTS_DIR mksubjdirs <subjid> cd <subjid> cd mri/orig mkdir 001 mkdir 002 mkdir 003 cp -r <path_to_dicoms>/95555-2-*.dcm 001/ cp -r <path_to_dicoms>/95555-3-*.dcm 002/ cp -r <path_to_dicoms>/95555-7-*.dcm 003/ mri_convert -it dicom -ot mgz 001/ 001.mgz mri_convert -it dicom -ot mgz 002/ 002.mgz mri_convert -it dicom -ot mgz 003/ 003.mgz |
recon-all -s <subjid> \ -i <path_to_dicoms>/95555-2-1.dcm -i <path_to_dicoms>/95555-3-1.dcm |
| Line 77: | Line 90: |
| Now you will have three .mgz files in mri/orig, and recon-all will automatically take these three structural scans and average/motion-correct them. Note that in your own case, the name of the dicom files will be different (in this example, 95555-2-*.dcm consisted of 128 files). | Now you will have two files in $SUBJECTS_DIR/<subjid>/mri/orig, named 001.mgz and 002.mgz. The {{{recon-all -i}}} command has taken your two structural scans and converted them to .mgz format. Note that in your own case, the name of the dicom files will be different (in this example, 95555-2-1.dcm is the first of a collection of 128 files). This import command is only issued '''once''', i.e. once your data has been successfully imported, do not use the {{{-i}}} flags again. With the two structural scans now imported into a freesurfer subject directory, you can begin processing the subject: {{{ recon-all -s <subjid> -all }}} |
Testing your FreeSurfer installation
There is a sample subject, called 'bert', found in the freesurfer/subjects directory, which contains pre-processed data stored in .mgz files.
freeview (volume & surface viewer)
freeview -v $SUBJECTS_DIR/bert/mri/brainmask.mgz -v $SUBJECTS_DIR/bert/mri/aseg.mgz:colormap=lut:opacity=0.2 -f $SUBJECTS_DIR/bert/surf/lh.white:edgecolor=yellow -f $SUBJECTS_DIR/bert/surf/rh.white:edgecolor=yellow -f $SUBJECTS_DIR/bert/surf/lh.pial:annot=aparc:edgecolor=red -f $SUBJECTS_DIR/bert/surf/rh.pial:annot=aparc:edgecolor=red
tkmedit (volume viewer)
To view a volume, type:
tkmedit bert orig.mgz
To view the subcortical segmentation results, type:
tkmedit bert norm.mgz -segmentation aseg.mgz $FREESURFER_HOME/FreeSurferColorLUT.txt
Note: you may need to include 'mri/' in the aseg.mgz path shown above on older versions of tkmedit.
As you move the mouse over areas of the brain, the label info is found in the 'Sgmtn label' box.
tksurfer (surface viewer)
To view a surface, type:
tksurfer bert rh pial
To increase brightness on that surface, in tksurfer:
View->Configure->Lighting->Brightness
To view cortical parcellation labels, in tksurfer:
File->Label->Import Annotation Browse to file rh.aparc.annot and select OK Redraw View icon is the one with the up/down arrows
qdec
To start the qdec application, type:
qdec
There is no sample data with which to test it, so you should just confirm that the application starts without displaying any error messages.
recon-all -help
The Freesurfer command:
recon-all --help | less
will print text on the overall functionality of Freesurfer.
recon-all -all
To re-create all volume and surface files, on the command-line type:
recon-all -s bert -all
If you get a permission error type the following:
sudo chmod -R a+w $FREESURFER_HOME/subjects/bert recon-all -s bert -all
Note that this operation may take 24 hours to complete. Consult recon-all --help for instructions on how to conduct multi-stage processing (eg. -autorecon1, -autorecon2 and -autorecon3). The -autorecon1 stage completes in less than a half an hour, and is worth running to test your installation, as it exercises most of the libraries. To run, type:
recon-all -s bert -autorecon1
Getting started with your own data
Given a subject having two sets of DICOMS (two runs of structural scans), do the following to setup a subject, where <subjid> is replaced with whatever name or id you want to give to that subject and SUBJECTS_DIR is set to the directory where you want to keep your subjects:
recon-all -s <subjid> \ -i <path_to_dicoms>/95555-2-1.dcm -i <path_to_dicoms>/95555-3-1.dcm
Now you will have two files in $SUBJECTS_DIR/<subjid>/mri/orig, named 001.mgz and 002.mgz. The recon-all -i command has taken your two structural scans and converted them to .mgz format. Note that in your own case, the name of the dicom files will be different (in this example, 95555-2-1.dcm is the first of a collection of 128 files). This import command is only issued once, i.e. once your data has been successfully imported, do not use the -i flags again. With the two structural scans now imported into a freesurfer subject directory, you can begin processing the subject:
recon-all -s <subjid> -all
Questions?
Send email to: freesurfer AT nmr DOT mgh DOT harvard DOT edu
Bug reports: analysis-bugs AT nmr DOT mgh DOT harvard DOT edu
