You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 8, 2025. It is now read-only.
To run this gear you need to select structural MRI file(s) as inputs and set configuration parameters. Minimally, the "anatomical" input file and a Freesurfer license need to be provided.
5
5
6
-
Note: the current version of Freesurfer has an known issue with using the `-parallel` flag: Recon-all will fail stochastically. Recon-all will be retried if it fails the first time.
6
+
Note: the current version of Freesurfer has known issues with using the `-parallel` flag that caused recon-all to fail stochastically. These have been patched in this gear. In case there are more, recon-all will be retried if it fails the first time.
7
7
8
8
# Inputs
9
9
@@ -13,11 +13,14 @@ Note: the current version of Freesurfer has an known issue with using the `-para
13
13
14
14
Anatomical NIfTI file, DICOM archive, or previous freesurfer-recon-all zip archive.
15
15
16
+
### Expert Options File (optional)
17
+
A user-created file containing special options to include in the command string. The file should contain as the first item the name of the command, and the items following it on rest of the line will be passed as the extra options. See [Freesurfer documentation](https://surfer.nmr.mgh.harvard.edu/fswiki/recon-all#ExpertOptionsFile) for more information and examples.
18
+
16
19
### freesurfer_license (optional)
17
20
A license is required for this gear to run but it does not have to be provided as an input file.
18
21
There are [three ways](https://docs.flywheel.io/hc/en-us/articles/360013235453-How-to-include-a-Freesurfer-license-file-in-order-to-run-the-fMRIPrep-gear-) to provide the license to this gear.
19
22
[Obtaining a license is free](https://surfer.nmr.mgh.harvard.edu/registration.html).
20
-
If you select a file here, it will by copied into the $FSHOME directory when the gear runs before launching recon-all.
23
+
If you select a file here, it will be copied into the $FSHOME directory when the gear runs before launching recon-all.
Additional anatomical NIfTI files. These will be averaged together to provide for better motion correction.
@@ -31,19 +34,19 @@ Note: arguments that start with "gear-" are not passed to recon-all. They contr
31
34
32
35
### gear-brainstem_structures (optional)
33
36
34
-
Generate an automated segmentation of four different brainstem structures from the input T1 scan: medulla oblongata, pons, midbrain and superior cerebellar peduncle (SCP). See: [https://surfer.nmr.mgh.harvard.edu/fswiki/BrainstemSubstructures](https://surfer.nmr.mgh.harvard.edu/fswiki/BrainstemSubstructures) for more info. Choosing this option will write <subject_id>_brainstemSsVolumes.v2.csv to the final results. The values in that spreadsheet will also be attached to the analysis as "Custom Information" ("info" metadata) so they can be found using search and in views. (Default=true)
37
+
Generate an automated segmentation of four different brainstem structures from the input T1 scan: medulla oblongata, pons, midbrain and superior cerebellar peduncle (SCP). See: [https://surfer.nmr.mgh.harvard.edu/fswiki/BrainstemSubstructures](https://surfer.nmr.mgh.harvard.edu/fswiki/BrainstemSubstructures) for more info. Choosing this option will write `<subject_id>_brainstemSsVolumes.v2.csv` to the final results. The values in that spreadsheet will also be attached to the analysis as "Custom Information" ("info" metadata) so they can be found using search and in views. (Default=true)
35
38
36
39
### gear-convert_stats (optional)
37
40
38
-
Convert FreeSurfer stats files to CSV. (Default=true). Converts a subcortical stats file created by recon-all and/or mri_segstats (e.g., aseg.stats) into a table in which each line is a subject and each column is a segmentation. The values are the volume of the segmentation in mm3 or the mean intensity over the structure. Also Converts all cortical stats file created by recon-all and or mris_anatomical_stats (e.g., ?h.aparc.stats) into a table in which each line is a subject and each column is a parcellation. By default, the values are the area of the parcellation in mm2. These tables will be written to .csv files that will be available in the final results. The values in the tables will also be attached to the analysis as "Custom Information" ("info" metadata) so they can be found using search and in views. (Default=true)
41
+
Convert FreeSurfer stats files to CSV. (Default=true). Converts a subcortical stats file created by recon-all and/or mri_segstats (e.g., `aseg.stats`) into a table in which each line is a subject and each column is a segmentation. The values are the volume of the segmentation in mm3 or the mean intensity over the structure. Also Converts all cortical stats file created by recon-all and or mris_anatomical_stats (e.g., `?h.aparc.stats`) into a table in which each line is a subject and each column is a parcellation. By default, the values are the area of the parcellation in mm2. These tables will be written to .csv files that will be available in the final results. The values in the tables will also be attached to the analysis as "Custom Information" ("info" metadata) so they can be found using search and in views. (Default=true)
39
42
40
43
### gear-convert_surfaces (optional)
41
44
42
-
Convert selected surfaces in subject/surf to obj in output. (Default = true)
45
+
Convert selected surfaces in subject/surf to obj in output. This allows the surfaces to be readily viewed on the Flywheel platform. (Default = true)
43
46
44
47
### gear-convert_volumes (optional)
45
48
46
-
Convert selected FreeSurfer volume files (mgz) to NIfTI format. (Default=true)
49
+
Convert selected FreeSurfer volume files (mgz) to NIfTI format. This allows the volumes to be readily viewed on the Flywheel platform. (Default=true)
47
50
48
51
### gear-dry-run (optional)
49
52
Do everything except actually execute recon-all. This is useful for debugging. (Default = false)
@@ -55,7 +58,11 @@ There are [three ways](https://docs.flywheel.io/hc/en-us/articles/360013235453-H
55
58
56
59
### gear-hippocampal_subfields (optional)
57
60
58
-
Generates an automated segmentation of the hippocampal subfields based on a statistical atlas built primarily upon ultra-high resolution (~0.1 mm isotropic) ex vivo MRI data. See: [https://surfer.nmr.mgh.harvard.edu/fswiki/HippocampalSubfieldsAndNucleiOfAmygdala](https://surfer.nmr.mgh.harvard.edu/fswiki/HippocampalSubfieldsAndNucleiOfAmygdala) for more info. Choosing this option will write <subject_id>_HippocampalSubfields.csv to the final results. The values in this spreadsheet will also be attached to the analysis as "Custom Information" ("info" metadata) so they can be found using search and in views. (Default=true)
61
+
Generates an automated segmentation of the hippocampal subfields based on a statistical atlas built primarily upon ultra-high resolution (~0.1 mm isotropic) ex vivo MRI data. See: [https://surfer.nmr.mgh.harvard.edu/fswiki/HippocampalSubfieldsAndNucleiOfAmygdala](https://surfer.nmr.mgh.harvard.edu/fswiki/HippocampalSubfieldsAndNucleiOfAmygdala) for more info. Choosing this option will write `<subject_id>_HippocampalSubfields.csv` to the final results. The values in this spreadsheet will also be attached to the analysis as "Custom Information" ("info" metadata) so they can be found using search and in views. (Default=true)
62
+
63
+
### gear-thalamic_nuclei (optional)
64
+
65
+
Produce a parcellation of the thalamus into 25 different nuclei, using a probabilistic atlas built with histological data. Choosing this option will produce 3 files in the subject's mri directory: `ThalamicNuclei.v12.T1.volumes.txt`, `ThalamicNuclei.v12.T1.mgz`, and `ThalamicNuclei.v12.T1.FSvoxelSpace.mgz`, and 2 files in the stats directory: `thalamic-nuclei.lh.v12.T1.stats` and `thalamic-nuclei.rh.v12.T1.stats`. See: [https://surfer.nmr.mgh.harvard.edu/fswiki/ThalamicNuclei](https://surfer.nmr.mgh.harvard.edu/fswiki/ThalamicNuclei) for more info. (Default=false)
59
66
60
67
### gear-log-level (optional)
61
68
Gear Log verbosity level (INFO|DEBUG)
@@ -73,7 +80,11 @@ Command line option to run recon-all in parallel. By default, it instructs the b
73
80
74
81
### reconall_options (required)
75
82
76
-
Command line options to the recon-all algorithm. By default we enable '-all' and '-qcache'. '-all' runs the entire pipeline and '-qcache' will resample data onto the average subject (called fsaverage) and smooth it at various FWHM (full-width/half-max) values, usually 0, 5, 10, 15, 20, and 25mm, which can speed later processing. Note that modification of these options may result in failure if the options are not recognized. (Default='-all -qcache')
83
+
Command line options to the recon-all algorithm. By default we enable '-all' and '-qcache'. '-all' runs the entire pipeline and '-qcache' will resample data onto the average subject (called fsaverage) and smooth it at various FWHM (full-width/half-max) values, usually 0, 5, 10, 15, 20, and 25mm, which can speed later processing. Note that modification of these options will result in failure if the options are not recognized. (Default='-all -qcache')
84
+
85
+
### gear-gtmseg (optional)
86
+
87
+
After running recon-all, run gtmseg on the subject. This creates a high-resolution segmentation `gtmseg.mgz`. This should take about an hour or two. `gtmseg.mgz` will use `aseg.mgz` for subcortical structures, `?h.aparc.annot` for cortical structures, and will estimate some extra-cerebral structures. (Default=False).
77
88
78
89
### subject_id (optional)
79
90
@@ -83,6 +94,7 @@ Desired subject ID. This is used to name the resulting FreeSurfer output directo
83
94
This gear runs recon-all on the provided inputs with the given configuration options. See [https://surfer.nmr.mgh.harvard.edu/fswiki/FreeSurferWiki](https://surfer.nmr.mgh.harvard.edu/fswiki/FreeSurferWiki) in general and [https://surfer.nmr.mgh.harvard.edu/fswiki/ReconAllDevTable](https://surfer.nmr.mgh.harvard.edu/fswiki/ReconAllDevTable) in particular for complete details.
84
95
85
96
# Outputs
86
-
All files that are the results of recon-all in the Freesurfer subject directory are compressed into a single zip archive.
97
+
All files that are the results of recon-all in the Freesurfer subject directory are compressed into a single zip archive. See the tutorial "Introduction to Freesurfer Output" tutorial [here](https://surfer.nmr.mgh.harvard.edu/fswiki/Tutorials) for details.
98
+
87
99
88
100
This gear was created using the [bdis-app-template](https://github.com/flywheel-apps/bids-app-template). For documentation on how to run the tests in this gear, please see that README file.
Copy file name to clipboardExpand all lines: manifest.json
+18-3Lines changed: 18 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -2,12 +2,12 @@
2
2
"name": "freesurfer-recon-all",
3
3
"label": "FreeSurfer 7.1.1: run recon-all",
4
4
"description": "FreeSurfer version 7.1.1 Release (July 27, 2020). This gear takes an anatomical NIfTI file and performs all of the FreeSurfer cortical reconstruction process. Outputs are provided in a zip file and include the entire output directory tree from Recon-All. Configuration options exist for setting the subject ID and for converting outputs to NIfTI, OBJ, and CSV. FreeSurfer is a software package for the analysis and visualization of structural and functional neuroimaging data from cross-sectional or longitudinal studies. It is developed by the Laboratory for Computational Neuroimaging at the Athinoula A. Martinos Center for Biomedical Imaging. Please see https://surfer.nmr.mgh.harvard.edu/fswiki/FreeSurferSoftwareLicense for license information.",
"description": "FreeSurfer license file, provided during registration with FreeSurfer. This file will by copied to the $FSHOME directory and used during execution of the Gear.",
85
85
"base": "file",
86
86
"optional": true
87
+
},
88
+
"expert": {
89
+
"description": "A user-created file containing special options to include in the command string. The file should contain as the first item the name of the command, and the items following it on rest of the line will be passed as the extra options. See Freesurfer documentation https://surfer.nmr.mgh.harvard.edu/fswiki/recon-all#ExpertOptionsFile for more information and examples.",
90
+
"base": "file",
91
+
"optional": true
87
92
}
88
93
},
89
94
"config": {
@@ -108,6 +113,11 @@
108
113
"default": "-all -qcache",
109
114
"type": "string"
110
115
},
116
+
"gear-gtmseg": {
117
+
"type": "boolean",
118
+
"default": false,
119
+
"description": "After running recon-all run gtmseg on the subject. (Default=False)."
120
+
},
111
121
"gear-hippocampal_subfields": {
112
122
"description": "Generates an automated segmentation of the hippocampal subfields based on a statistical atlas built primarily upon ultra-high resolution (~0.1 mm isotropic) ex vivo MRI data. Choosing this option will write <subject_id>_HippocampalSubfields.csv to the final results. See: https://surfer.nmr.mgh.harvard.edu/fswiki/HippocampalSubfields for more info. (Default=true)",
113
123
"default": true,
@@ -118,6 +128,11 @@
118
128
"default": true,
119
129
"type": "boolean"
120
130
},
131
+
"gear-thalamic_nuclei": {
132
+
"description": "Produce a parcellation of the thalamus into 25 different nuclei, using a probabilistic atlas built with histological data. Choosing this option will produce 3 files in the subject's mri directory: ThalamicNuclei.v12.T1.volumes.txt, ThalamicNuclei.v12.T1.mgz, and ThalamicNuclei.v12.T1.FSvoxelSpace.mgz, and 2 files in the stats directory: thalamic-nuclei.lh.v12.T1.stats and thalamic-nuclei.rh.v12.T1.stats. See: https://surfer.nmr.mgh.harvard.edu/fswiki/ThalamicNuclei for more info. (Default=false)",
133
+
"default": false,
134
+
"type": "boolean"
135
+
},
121
136
"gear-register_surfaces": {
122
137
"description": "Runs the xhemireg and surfreg scripts on your subject after having run recon-all in order to register the subject's left and inverted-right hemispheres to the fsaverage_sym subject. (The fsaverage_sym subject is a version of the fsaverage subject with a single the left-right symmetric pseudo-hemisphere.) (Default=true)",
0 commit comments