Skip to content

Commit

Permalink
deploy: 379583f
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Feb 7, 2025
1 parent d867d44 commit 8c50787
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 139 deletions.
Binary file modified dev/objects.inv
Binary file not shown.
139 changes: 1 addition & 138 deletions dev/scripts/recon_surf.html
Original file line number Diff line number Diff line change
Expand Up @@ -491,136 +491,6 @@ <h2>Usage<a class="headerlink" href="#usage" title="Link to this heading">¶</a>

If you use this for research publications, please cite:

Henschel L, Conjeti S, Estrada S, Diers K, Fischl B, Reuter M, FastSurfer - A
fast and accurate deep learning based neuroimaging pipeline, NeuroImage 219
(2020), 117012. https://doi.org/10.1016/j.neuroimage.2020.117012

Henschel L*, Kuegler D*, Reuter M. (*co-first). FastSurferVINN: Building
Resolution-Independence into Deep Learning Segmentation Methods - A Solution
for HighRes Brain MRI. NeuroImage 251 (2022), 118933.
http://dx.doi.org/10.1016/j.neuroimage.2022.118933
</pre></div>
</div>
<section id="required-arguments">
<h3>Required arguments<a class="headerlink" href="#required-arguments" title="Link to this heading"></a></h3>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">--sd</span></code>: Output directory $SUBJECTS_DIR (equivalent to FreeSurfer setup –&gt; <code class="docutils literal notranslate"><span class="pre">$SUBJECTS_DIR/&lt;sid&gt;/mri</span></code>;
<code class="docutils literal notranslate"><span class="pre">$SUBJECTS_DIR/&lt;sid&gt;/surf</span></code> … will be created).</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">--sid</span></code>: Subject ID for directory inside $SUBJECTS_DIR to be created ($SUBJECTS_DIR/sid/…)</p></li>
</ul>
</section>
<section id="optional-arguments">
<h3>Optional arguments<a class="headerlink" href="#optional-arguments" title="Link to this heading"></a></h3>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">--t1</span></code>: T1 full head input (not bias corrected). This must be conformed (dimensions: same along each axis, voxel size:
isotropic, LIA orientation, and data type UCHAR). Images can be conformed using FastSurferCNN’s
<a class="reference external" href="https://github.com/Deep-MI/FastSurfer/blob/stable/FastSurferCNN/data_loader/conform.py">conform.py</a> script (usage
example: <code class="docutils literal notranslate"><span class="pre">python3</span> <span class="pre">FastSurferCNN/data_loader/conform.py</span> <span class="pre">-i</span> <span class="pre">&lt;T1_input&gt;</span> <span class="pre">-o</span> <span class="pre">&lt;conformed_T1_output&gt;</span></code>). If not passed we use
the <code class="docutils literal notranslate"><span class="pre">orig.mgz</span></code> in the output subject mri directory if available.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">--asegdkt_segfile</span></code>: Global path with filename of segmentation (where and under which name to find it, must already
exist). This must be conformed (dimensions: same along each axis, voxel size: isotropic, and LIA orientation).
FastSurferCNN’s segmentations are conformed by default. Please ensure that segmentations produced otherwise are also
conformed and equivalent in dimension and voxel size to the <code class="docutils literal notranslate"><span class="pre">--t1</span> <span class="pre">&lt;image&gt;</span></code>.
Default location: <code class="docutils literal notranslate"><span class="pre">$SUBJECTS_DIR/$sid/mri/aparc.DKTatlas+aseg.deep.mgz</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">--3T</span></code>: for Talairach registration, use the 3T atlas instead of the 1.5T atlas (which is used if the flag is not
provided). This gives better (more consistent with FreeSurfer) ICV estimates (eTIV) for 3T and better Talairach
registration matrices, but has little impact on standard volume or surface stats.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">--fstess</span></code>: Use mri_tesselate instead of marching cube (default) for surface creation</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">--fsqsphere</span></code>: Use FreeSurfer default instead of novel spectral spherical projection for qsphere</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">--fsaparc</span></code>: Use FS aparc segmentations in addition to DL prediction (slower in this case and usually the mapped ones
from the DL prediction are fine)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">--threads</span></code>: Set openMP and ITK threads to <int>, activates hemisphere parallelization if threads &gt;= 2.</p></li>
</ul>
</section>
<section id="other">
<h3>Other<a class="headerlink" href="#other" title="Link to this heading"></a></h3>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">--py</span></code>: Command for python, used in both pipelines. Default: python3.10</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">--no_surfreg</span></code>: Skip surface registration with FreeSurfer (if only stats are needed)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">--fs_license</span></code>: Path to FreeSurfer license key file.
<a class="reference external" href="https://surfer.nmr.mgh.harvard.edu/registration.html">Register for free</a> to obtain it if you do not have FreeSurfer
installed already</p></li>
</ul>
</section>
<section id="more-parameters-details">
<h3>More parameters details<a class="headerlink" href="#more-parameters-details" title="Link to this heading"></a></h3>
<p>The <code class="docutils literal notranslate"><span class="pre">--help</span></code> flag of <code class="docutils literal notranslate"><span class="pre">recon-surf.sh</span></code> also prints details to your specific version of <code class="docutils literal notranslate"><span class="pre">recon-surf.sh</span></code> to the console.</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>$ ./recon-surf.sh --help

Usage: recon-surf.sh --sid &lt;sid&gt; --sd &lt;sdir&gt; --t1 &lt;t1&gt; --asegdkt_segfile &lt;asegdkt_segfile&gt; [OPTIONS]

recon-surf.sh takes a segmentation and T1 full head image and creates surfaces,
thickness etc as a FS subject dir.

FLAGS:
--sid &lt;subjectID&gt; Subject ID to create directory inside $SUBJECTS_DIR
--sd &lt;subjects_dir&gt; Output directory $SUBJECTS_DIR (or pass via env var)
--t1 &lt;T1_input&gt; T1 full head input (not bias corrected). This must be
a conformed image (dimensions: 256x256x256, voxel
size: 1x1x1, LIA orientation, and data type UCHAR).
Images can be conformed using FastSurferCNN&#39;s
conform.py script (usage example: python3
FastSurferCNN/data_loader/conform.py -i &lt;T1_input&gt;
-o &lt;conformed_T1_output&gt;). Requires an ABSOLUTE Path!
--asegdkt_segfile &lt;asegdkt_segfile&gt;
Name of intermediate DL-based segmentation file
(similar to aparc+aseg). This must be conformed
(voxel size: isotropic, LIA orientation, and, if voxel
size 1mm, dimensions: 256x256x256). FastSurferCNN&#39;s
segmentations are conformed by default; please ensure
that segmentations produced otherwise are conformed.
Requires an ABSOLUTE Path! Default location:
$SUBJECTS_DIR/$sid/mri/aparc.DKTatlas+aseg.deep.mgz
--mask_name &lt;mask_file&gt; Path to the brain mask file to use. Default location:
$SUBJECTS_DIR/$sid/mri/mask.mgz
--edits Disable the check for existing recon-surf.sh run, replace
&lt;asegdkt_segfile&gt; by its manedit-suffixed version,
includes wm.mgz and brain.finalsurfs.mgz edits,
and enables FreeSurfer-style WM control points.
--fstess Revert to FreeSurfer mri_tesselate for surface creation
(default: mri_mc)
--fsqsphere Revert to FreeSurfer iterative inflation for qsphere
(default: spectral spherical projection)
--fsaparc Additionally create FS aparc segmentations and ribbon.
Skipped by default (--&gt; DL prediction is used which
is faster, and usually these mapped ones are fine).
Note, if you switch this on it will create all cortical
parcellations with FreeSurfer&#39;s spherical atlases and
also map these into the aparc+aseg file instead of
the FastSurfer ones. FastSurfer&#39;s cortical DKT atlas
results can still be found in:
&lt;hemi&gt;.aparc.DKTatlas.mapped.stats
--3T Use the 3T atlas for talairach registration (gives better
eTIV estimates for 3T MR images, default: 1.5T atlas).
--threads &lt;int&gt; Set openMP and ITK threads to &lt;int&gt;, parallelize
hemispheres, if threads &gt;= 2.
--py &lt;python_cmd&gt; Command for python, default python3.10
--fs_license &lt;license&gt; Path to FreeSurfer license key file. Register at
https://surfer.nmr.mgh.harvard.edu/registration.html
for free to obtain it if you do not have FreeSurfer
installed already.
--base For longitudinal template (base) creation.
--long &lt;baseid&gt; For longitudinal time point creation, pass the ID of
the base (template) which needs to exist already in
the same subjects_dir.
-h --help Print Help

Dev Flags:
--ignore_fs_version Switch on to avoid check for FreeSurfer version.
Program will otherwise terminate if 7.4.1 is
not sourced. Can be used for testing dev versions.
--no_fs_T1 Do not generate T1.mgz (normalized nu.mgz included in
standard FreeSurfer output) and create brainmask.mgz
directly from norm.mgz instead. Saves 1:30 min.
--no_surfreg Do not run Surface registration with FreeSurfer (for
cross-subject correspondence). Not recommended, but
speeds up processing if you just need the stats and
don&#39;t want to do thickness analysis on the cortex.

REFERENCES:

If you use this for research publications, please cite:

Henschel L, Conjeti S, Estrada S, Diers K, Fischl B, Reuter M, FastSurfer - A
fast and accurate deep learning based neuroimaging pipeline, NeuroImage 219
(2020), 117012. https://doi.org/10.1016/j.neuroimage.2020.117012
Expand All @@ -632,7 +502,6 @@ <h3>More parameters details<a class="headerlink" href="#more-parameters-details"
</pre></div>
</div>
</section>
</section>
<section id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Link to this heading"></a></h2>
<section id="example-1-surface-module-inside-docker">
Expand Down Expand Up @@ -822,13 +691,7 @@ <h3>Example 4: recon-surf on multiple subjects<a class="headerlink" href="#examp
<ul>
<li><a class="reference internal" href="#">Surface pipeline: recon-surf.sh</a><ul>
<li><a class="reference internal" href="#overview">Overview</a></li>
<li><a class="reference internal" href="#usage">Usage</a><ul>
<li><a class="reference internal" href="#required-arguments">Required arguments</a></li>
<li><a class="reference internal" href="#optional-arguments">Optional arguments</a></li>
<li><a class="reference internal" href="#other">Other</a></li>
<li><a class="reference internal" href="#more-parameters-details">More parameters details</a></li>
</ul>
</li>
<li><a class="reference internal" href="#usage">Usage</a></li>
<li><a class="reference internal" href="#examples">Examples</a><ul>
<li><a class="reference internal" href="#example-1-surface-module-inside-docker">Example 1: Surface module inside Docker</a></li>
<li><a class="reference internal" href="#example-2-recon-surf-inside-singularity">Example 2: recon-surf inside Singularity</a><ul>
Expand Down
2 changes: 1 addition & 1 deletion dev/searchindex.js

Large diffs are not rendered by default.

0 comments on commit 8c50787

Please sign in to comment.