fsqc


Namefsqc JSON
Version 2.0.1 PyPI version JSON
download
home_page
SummaryQuality control scripts for FastSurfer and FreeSurfer structural MRI data
upload_time2023-10-25 08:22:52
maintainer
docs_urlNone
author
requires_python>=3.8
licenseMIT License Copyright (c) 2019 Image Analysis, DZNE e.V. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords fastsurfer freesurfer quality control quality assurance
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # fsqc toolbox

## Description

This package provides quality assurance / quality control scripts for FastSurfer- or
FreeSurfer-processed structural MRI data.

It is a revision, extension, and translation to the Python language of the
[Freesurfer QA Tools](https://surfer.nmr.mgh.harvard.edu/fswiki/QATools). It has
been augmented by additional functions from the [MRIQC toolbox](https://github.com/poldracklab/mriqc),
and with code derived from the [LaPy](https://github.com/Deep-MI/lapy) and
[BrainPrint](https://github.com/Deep-MI/brainprint) toolboxes.

The core functionality of this toolbox is to compute the following features:

variable       |   description
---------------|----------------------------------------------------------------
subject        |   subject ID
wm_snr_orig    |   signal-to-noise ratio for white matter in orig.mgz
gm_snr_orig    |   signal-to-noise ratio for gray matter in orig.mgz
wm_snr_norm    |   signal-to-noise ratio for white matter in norm.mgz
gm_snr_norm    |   signal-to-noise ratio for gray matter in norm.mgz
cc_size        |   relative size of the corpus callosum
lh_holes       |   number of holes in the left hemisphere
rh_holes       |   number of holes in the right hemisphere
lh_defects     |   number of defects in the left hemisphere
rh_defects     |   number of defects in the right hemisphere
topo_lh        |   topological fixing time for the left hemisphere
topo_rh        |   topological fixing time for the right hemisphere
con_lh_snr     |   wm/gm contrast signal-to-noise ratio in the left hemisphere
con_rh_snr     |   wm/gm contrast signal-to-noise ratio in the right hemisphere
rot_tal_x      |   rotation component of the Talairach transform around the x axis
rot_tal_y      |   rotation component of the Talairach transform around the y axis
rot_tal_z      |   rotation component of the Talairach transform around the z axis

The program will use an existing output directory (or try to create it) and
write a csv table into that location. The csv table will contain the above
metrics plus a subject identifier.

The program can also be run on images that were processed with [FastSurfer](https://github.com/Deep-MI/FastSurfer)
(v1.1 or later) instead of FreeSurfer. In that case, simply add a `--fastsurfer`
switch to your shell command. Note that FastSurfer's full processing stream must
have been run, including surface reconstruction (i.e. brain segmentation alone
is not sufficient).

In addition to the core functionality of the toolbox there are several optional
modules that can be run according to need:

- screenshots module

This module allows for the automated generation of cross-sections of the brain
that are overlaid with the anatomical segmentations (asegs) and the white and
pial surfaces. These images will be saved to the 'screenshots' subdirectory
that will be created within the output directory. These images can be used for
quickly glimpsing through the processing results. Note that no display manager
is required for this module, i.e. it can be run on a remote server, for example.

- surfaces module

This module allows for the automated generation of surface renderings of the
left and right pial and inflated surfaces, overlaid with the aparc annotation.
These images will be saved to the 'surfaces' subdirectory that will be created
within the output directory. These images can be used for quickly glimpsing
through the processing results. Note that no display manager is required for
this module, i.e. it can be run on a remote server, for example.

- skullstrip module

This module allows for the automated generation cross-sections of the brain
that are overlaid with the colored and semi-transparent brainmask. This allows
to check the quality of the skullstripping in FreeSurfer. The resulting images
will be saved to the 'skullstrip' subdirectory that will be created within the
output directory.

- fornix module

This is a module to assess potential issues with the segmentation of the
corpus callosum, which may incorrectly include parts of the fornix. To assess
segmentation quality, a screenshot of the contours of the corpus callosum
segmentation overlaid on the norm.mgz will be saved as 'cc.png' for each
subject within the 'fornix' subdirectory of the output directory.

- modules for the amygdala, hippocampus, and hypothalamus

These modules evaluate potential missegmentations of the amygdala, hippocampus,
and hypothalamus. To assess segmentation quality, screenshots will be created
These modules require prior processing of the MR images with FreeSurfer's
dedicated toolboxes for the segmentation of the amygdala and hippocampus, and
the hypothalamus, respectively.

- shape module

The shape module will run a shapeDNA / brainprint analysis to compute distances
of shape descriptors between lateralized brain structures. This can be used
to identify discrepancies and irregularities between pairs of corresponding
structures. The results will be included in the main csv table, and the output
directory will also contain a 'brainprint' subdirectory.

- outlier module

This is a module to detect extreme values among the subcortical ('aseg')
segmentations as well as the cortical parcellations. If present, hypothalamic
and hippocampal subsegmentations will also be included.

The outlier detection is based on comparisons with the
distributions of the sample as well as normative values taken from the
literature (see References).

For comparisons with the sample distributions, extreme values are defined in
two ways: nonparametrically, i.e. values that are 1.5 times the interquartile
range below or above the 25th or 75th percentile of the sample, respectively,
and parametrically, i.e. values that are more than 2 standard deviations above
or below the sample mean. Note that a minimum of 10 supplied subjects is
required for running these analyses, otherwise `NaNs` will be returned.

For comparisons with the normative values, lower and upper bounds are computed
from the 95% prediction intervals of the regression models given in Potvin et
al., 1996, and values exceeding these bounds will be flagged. As an
alternative, users may specify their own normative values by using the
'--outlier-table' argument. This requires a custom csv table with headers
`label`, `upper`, and `lower`, where `label` indicates a column of anatomical
names. It can be a subset and the order is arbitrary, but naming must exactly
match the nomenclature of the 'aseg.stats' and/or '[lr]h.aparc.stats' file.
If cortical parcellations are included in the outlier table for a comparison
with aparc.stats values, the labels must have a 'lh.' or 'rh.' prefix. file.
`upper` and `lower` are user-specified upper and lower bounds.

The main csv table will be appended with the following summary variables, and
more detailed output about will be saved as csv tables in the 'outliers'
subdirectory of the main output directory.

variable                 |   description
-------------------------|---------------------------------------------------
n_outliers_sample_nonpar | number of structures that are 1.5 times the IQR above/below the 75th/25th percentile
n_outliers_sample_param  | number of structures that are 2 SD above/below the mean
n_outliers_norms         | number of structures exceeding the upper and lower bounds of the normative values

___

## Usage

### As a command line tool

```
run_fsqc --subjects_dir <directory> --output_dir <directory>
    [--subjects SubjectID [SubjectID ...]]
    [--subjects-file <file>] [--screenshots]
    [--screenshots-html] [--surfaces] [--surfaces-html]
    [--skullstrip] [--skullstrip-html]
    [--fornix] [--fornix-html] [--hippocampus]
    [--hippocampus-html] [--hippocampus-label ... ]
    [--hypothalamus] [--hypothalamus-html] [--shape]
    [--outlier] [--fastsurfer] [-h] [--more-help]
    [...]


required arguments:
  --subjects_dir <directory>
                         subjects directory with a set of Freesurfer- or
                         Fastsurfer-processed individual datasets.
  --output_dir <directory>
                         output directory

optional arguments:
  --subjects SubjectID [SubjectID ...]
                         list of subject IDs
  --subjects-file <file> filename of a file with subject IDs (one per line)
  --screenshots          create screenshots of individual brains
  --screenshots-html     create screenshots of individual brains incl.
                         html summary page
  --surfaces             create screenshots of individual brain surfaces
  --surfaces-html        create screenshots of individual brain surfaces
                         and html summary page
  --skullstrip           create screenshots of individual brainmasks
  --skullstrip-html      create screenshots of individual brainmasks and
                         html summary page
  --fornix               check fornix segmentation
  --fornix-html          check fornix segmentation and create html summary
                         page of fornix evaluation
  --hypothalamus         check hypothalamic segmentation
  --hypothalamus-html    check hypothalamic segmentation and create html
                         summary page
  --hippocampus          check segmentation of hippocampus and amygdala
  --hippocampus-html     check segmentation of hippocampus and amygdala
                         and create html summary page
  --hippocampus-label    specify label for hippocampus segmentation files
                         (default: T1.v21). The full filename is then
                         [lr]h.hippoAmygLabels-<LABEL>.FSvoxelSpace.mgz
  --shape                run shape analysis
  --outlier              run outlier detection
  --outlier-table        specify normative values (only in conjunction with
                         --outlier)
  --fastsurfer           use FastSurfer instead of FreeSurfer output
  --exit-on-error        terminate the program when encountering an error;
                         otherwise, try to continue with the next module or
                         case

getting help:
  -h, --help            display this help message and exit
  --more-help           display extensive help message and exit

expert options:
  --screenshots_base <image>
                        filename of an image that should be used instead of
                        norm.mgz as the base image for the screenshots. Can be
                        an individual file (which would not be appropriate for
                        multi-subject analysis) or can be a file without
                        pathname and with the same filename across subjects
                        within the 'mri' subdirectory of an individual
                        FreeSurfer results directory (which would be appropriate
                        for multi-subject analysis).
  --screenshots_overlay <image>
                        path to an image that should be used instead of aseg.mgz
                        as the overlay image for the screenshots; can also be
                        none. Can be an individual file (which would not be
                        appropriate for multi-subject analysis) or can be a file
                        without pathname and with the same filename across
                        subjects within the 'mri' subdirectory of an individual
                        FreeSurfer results directory (which would be appropriate
                        for multi-subject analysis).
  --screenshots_surf <surf> [<surf> ...]
                        one or more surface files that should be used instead
                        of [lr]h.white and [lr]h.pial; can also be none. Can be
                        one or more individual file(s) (which would not be
                        appropriate for multi-subject analysis) or can be a
                        (list of) file(s) without pathname and with the same
                        filename across subjects within the 'surf' subdirectory
                        of an individual FreeSurfer results directory (which
                        would be appropriate for multi-subject analysis).
  --screenshots_views <view> [<view> ...]
                        one or more views to use for the screenshots in the form
                        of x=<numeric> y=<numeric> and/or z=<numeric>. Order
                        does not matter. Default views are x=-10 x=10 y=0 z=0.
  --screenshots_layout <rows> <columns>
                        layout matrix for screenshot images.

```

*Examples:*

- Run the QC pipeline for all subjects found in `/my/subjects/directory`:

```bash
run_fsqc --subjects_dir /my/subjects/directory --output_dir /my/output/directory
```

- Run the QC pipeline for two specific subjects that need to be present in `/my/subjects/directory`:

```bash
run_fsqc --subjects_dir /my/subjects/directory --output_dir /my/output/directory --subjects mySubjectID1 mySubjectID2
```

- Run the QC pipeline for all subjects found in `/my/subjects/directory` after full FastSurfer processing:

```bash
run_fsqc --subjects_dir /my/subjects/directory --output_dir /my/output/directory --fastsurfer
```

- Run the QC pipeline plus the screenshots module for all subjects found in `/my/subjects/directory`:

```bash
run_fsqc --subjects_dir /my/subjects/directory --output_dir /my/output/directory --screenshots
```

- Run the QC pipeline plus the fornix pipeline for all subjects found in `/my/subjects/directory`:

```bash
run_fsqc --subjects_dir /my/subjects/directory --output_dir /my/output/directory --fornix
```

- Run the QC pipeline plus the shape analysis pipeline for all subjects found in `/my/subjects/directory`:

```bash
run_fsqc --subjects_dir /my/subjects/directory --output_dir /my/output/directory --shape
```

- Run the QC pipeline plus the outlier detection module for all subjects found in `/my/subjects/directory`:

```bash
run_fsqc --subjects_dir /my/subjects/directory --output_dir /my/output/directory --outlier
```

- Run the QC pipeline plus the outlier detection module with a user-specific table of normative values for all subjects found in `/my/subjects/directory`:

```bash
run_fsqc --subjects_dir /my/subjects/directory --output_dir /my/output/directory --outlier --outlier-table /my/table/with/normative/values.csv
```

- Note that the `--screenshots`, `--fornix`, `--shape`, and `--outlier` (and other) arguments can also be used in conjunction.

### As a Python package

As an alternative to their command-line usage, the fsqc scripts can also be run
within a pure Python environment, i.e. installed and imported as a Python package.

Use `import fsqc` (or sth. equivalent) to import the package within a
Python environment, and use the `run_fsqc` function from the `fsqc` module to
run an analysis.

In its most basic form:

```python
import fsqc
fsqc.run_fsqc(subjects_dir='/my/subjects/dir', output_dir='/my/output/dir')
```

Specify subjects as a list:

```python
import fsqc
fsqc.run_fsqc(subjects_dir='/my/subjects/dir', output_dir='/my/output/dir', subjects=['subject1', 'subject2', 'subject3'])
```

And as a more elaborate example:

```python
import fsqc
fsqc.run_fsqc(subjects_dir='/my/subjects/dir', output_dir='/my/output/dir', subject_file='/my/subjects/file.txt', screenshots_html=True, surfaces_html=True, skullstrip_html=True, fornix_html=True, hypothalamus_html=True, hippocampus_html=True, hippocampus_label="T1.v21", shape=True, outlier=True)
```


Call `help(fsqc.run_fsqc)` for further usage info and additional options.

___

## Citations

- Esteban O, Birman D, Schaer M, Koyejo OO, Poldrack RA, Gorgolewski KJ; 2017;
  MRIQC: Advancing the Automatic Prediction of Image Quality in MRI from Unseen
  Sites; PLOS ONE 12(9):e0184661; doi:10.1371/journal.pone.0184661.

- Wachinger C, Golland P, Kremen W, Fischl B, Reuter M; 2015; BrainPrint: a
  Discriminative Characterization of Brain Morphology; Neuroimage: 109, 232-248;
  doi:10.1016/j.neuroimage.2015.01.032.

- Reuter M, Wolter FE, Shenton M, Niethammer M; 2009; Laplace-Beltrami
  Eigenvalues and Topological Features of Eigenfunctions for Statistical Shape
  Analysis; Computer-Aided Design: 41, 739-755; doi:10.1016/j.cad.2009.02.007.

- Potvin O, Mouiha A, Dieumegarde L, Duchesne S, & Alzheimer's Disease
  Neuroimaging Initiative; 2016; Normative data for subcortical regional volumes
  over the lifetime of the adult human brain; Neuroimage: 137, 9-20; doi.org/10.1016/j.neuroimage.2016.05.016


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "fsqc",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Kersten Diers <kersten.diers@dzne.de>, Martin Reuter <martin.reuter@dzne.de>",
    "keywords": "FastSurfer,FreeSurfer,Quality control,Quality assurance",
    "author": "",
    "author_email": "Kersten Diers <kersten.diers@dzne.de>, Martin Reuter <martin.reuter@dzne.de>",
    "download_url": "https://files.pythonhosted.org/packages/3d/e5/ae22169a8837654c5811dd57c7901bafc46e69372ab5d78640a9dd703eb4/fsqc-2.0.1.tar.gz",
    "platform": null,
    "description": "# fsqc toolbox\n\n## Description\n\nThis package provides quality assurance / quality control scripts for FastSurfer- or\nFreeSurfer-processed structural MRI data.\n\nIt is a revision, extension, and translation to the Python language of the\n[Freesurfer QA Tools](https://surfer.nmr.mgh.harvard.edu/fswiki/QATools). It has\nbeen augmented by additional functions from the [MRIQC toolbox](https://github.com/poldracklab/mriqc),\nand with code derived from the [LaPy](https://github.com/Deep-MI/lapy) and\n[BrainPrint](https://github.com/Deep-MI/brainprint) toolboxes.\n\nThe core functionality of this toolbox is to compute the following features:\n\nvariable       |   description\n---------------|----------------------------------------------------------------\nsubject        |   subject ID\nwm_snr_orig    |   signal-to-noise ratio for white matter in orig.mgz\ngm_snr_orig    |   signal-to-noise ratio for gray matter in orig.mgz\nwm_snr_norm    |   signal-to-noise ratio for white matter in norm.mgz\ngm_snr_norm    |   signal-to-noise ratio for gray matter in norm.mgz\ncc_size        |   relative size of the corpus callosum\nlh_holes       |   number of holes in the left hemisphere\nrh_holes       |   number of holes in the right hemisphere\nlh_defects     |   number of defects in the left hemisphere\nrh_defects     |   number of defects in the right hemisphere\ntopo_lh        |   topological fixing time for the left hemisphere\ntopo_rh        |   topological fixing time for the right hemisphere\ncon_lh_snr     |   wm/gm contrast signal-to-noise ratio in the left hemisphere\ncon_rh_snr     |   wm/gm contrast signal-to-noise ratio in the right hemisphere\nrot_tal_x      |   rotation component of the Talairach transform around the x axis\nrot_tal_y      |   rotation component of the Talairach transform around the y axis\nrot_tal_z      |   rotation component of the Talairach transform around the z axis\n\nThe program will use an existing output directory (or try to create it) and\nwrite a csv table into that location. The csv table will contain the above\nmetrics plus a subject identifier.\n\nThe program can also be run on images that were processed with [FastSurfer](https://github.com/Deep-MI/FastSurfer)\n(v1.1 or later) instead of FreeSurfer. In that case, simply add a `--fastsurfer`\nswitch to your shell command. Note that FastSurfer's full processing stream must\nhave been run, including surface reconstruction (i.e. brain segmentation alone\nis not sufficient).\n\nIn addition to the core functionality of the toolbox there are several optional\nmodules that can be run according to need:\n\n- screenshots module\n\nThis module allows for the automated generation of cross-sections of the brain\nthat are overlaid with the anatomical segmentations (asegs) and the white and\npial surfaces. These images will be saved to the 'screenshots' subdirectory\nthat will be created within the output directory. These images can be used for\nquickly glimpsing through the processing results. Note that no display manager\nis required for this module, i.e. it can be run on a remote server, for example.\n\n- surfaces module\n\nThis module allows for the automated generation of surface renderings of the\nleft and right pial and inflated surfaces, overlaid with the aparc annotation.\nThese images will be saved to the 'surfaces' subdirectory that will be created\nwithin the output directory. These images can be used for quickly glimpsing\nthrough the processing results. Note that no display manager is required for\nthis module, i.e. it can be run on a remote server, for example.\n\n- skullstrip module\n\nThis module allows for the automated generation cross-sections of the brain\nthat are overlaid with the colored and semi-transparent brainmask. This allows\nto check the quality of the skullstripping in FreeSurfer. The resulting images\nwill be saved to the 'skullstrip' subdirectory that will be created within the\noutput directory.\n\n- fornix module\n\nThis is a module to assess potential issues with the segmentation of the\ncorpus callosum, which may incorrectly include parts of the fornix. To assess\nsegmentation quality, a screenshot of the contours of the corpus callosum\nsegmentation overlaid on the norm.mgz will be saved as 'cc.png' for each\nsubject within the 'fornix' subdirectory of the output directory.\n\n- modules for the amygdala, hippocampus, and hypothalamus\n\nThese modules evaluate potential missegmentations of the amygdala, hippocampus,\nand hypothalamus. To assess segmentation quality, screenshots will be created\nThese modules require prior processing of the MR images with FreeSurfer's\ndedicated toolboxes for the segmentation of the amygdala and hippocampus, and\nthe hypothalamus, respectively.\n\n- shape module\n\nThe shape module will run a shapeDNA / brainprint analysis to compute distances\nof shape descriptors between lateralized brain structures. This can be used\nto identify discrepancies and irregularities between pairs of corresponding\nstructures. The results will be included in the main csv table, and the output\ndirectory will also contain a 'brainprint' subdirectory.\n\n- outlier module\n\nThis is a module to detect extreme values among the subcortical ('aseg')\nsegmentations as well as the cortical parcellations. If present, hypothalamic\nand hippocampal subsegmentations will also be included.\n\nThe outlier detection is based on comparisons with the\ndistributions of the sample as well as normative values taken from the\nliterature (see References).\n\nFor comparisons with the sample distributions, extreme values are defined in\ntwo ways: nonparametrically, i.e. values that are 1.5 times the interquartile\nrange below or above the 25th or 75th percentile of the sample, respectively,\nand parametrically, i.e. values that are more than 2 standard deviations above\nor below the sample mean. Note that a minimum of 10 supplied subjects is\nrequired for running these analyses, otherwise `NaNs` will be returned.\n\nFor comparisons with the normative values, lower and upper bounds are computed\nfrom the 95% prediction intervals of the regression models given in Potvin et\nal., 1996, and values exceeding these bounds will be flagged. As an\nalternative, users may specify their own normative values by using the\n'--outlier-table' argument. This requires a custom csv table with headers\n`label`, `upper`, and `lower`, where `label` indicates a column of anatomical\nnames. It can be a subset and the order is arbitrary, but naming must exactly\nmatch the nomenclature of the 'aseg.stats' and/or '[lr]h.aparc.stats' file.\nIf cortical parcellations are included in the outlier table for a comparison\nwith aparc.stats values, the labels must have a 'lh.' or 'rh.' prefix. file.\n`upper` and `lower` are user-specified upper and lower bounds.\n\nThe main csv table will be appended with the following summary variables, and\nmore detailed output about will be saved as csv tables in the 'outliers'\nsubdirectory of the main output directory.\n\nvariable                 |   description\n-------------------------|---------------------------------------------------\nn_outliers_sample_nonpar | number of structures that are 1.5 times the IQR above/below the 75th/25th percentile\nn_outliers_sample_param  | number of structures that are 2 SD above/below the mean\nn_outliers_norms         | number of structures exceeding the upper and lower bounds of the normative values\n\n___\n\n## Usage\n\n### As a command line tool\n\n```\nrun_fsqc --subjects_dir <directory> --output_dir <directory>\n    [--subjects SubjectID [SubjectID ...]]\n    [--subjects-file <file>] [--screenshots]\n    [--screenshots-html] [--surfaces] [--surfaces-html]\n    [--skullstrip] [--skullstrip-html]\n    [--fornix] [--fornix-html] [--hippocampus]\n    [--hippocampus-html] [--hippocampus-label ... ]\n    [--hypothalamus] [--hypothalamus-html] [--shape]\n    [--outlier] [--fastsurfer] [-h] [--more-help]\n    [...]\n\n\nrequired arguments:\n  --subjects_dir <directory>\n                         subjects directory with a set of Freesurfer- or\n                         Fastsurfer-processed individual datasets.\n  --output_dir <directory>\n                         output directory\n\noptional arguments:\n  --subjects SubjectID [SubjectID ...]\n                         list of subject IDs\n  --subjects-file <file> filename of a file with subject IDs (one per line)\n  --screenshots          create screenshots of individual brains\n  --screenshots-html     create screenshots of individual brains incl.\n                         html summary page\n  --surfaces             create screenshots of individual brain surfaces\n  --surfaces-html        create screenshots of individual brain surfaces\n                         and html summary page\n  --skullstrip           create screenshots of individual brainmasks\n  --skullstrip-html      create screenshots of individual brainmasks and\n                         html summary page\n  --fornix               check fornix segmentation\n  --fornix-html          check fornix segmentation and create html summary\n                         page of fornix evaluation\n  --hypothalamus         check hypothalamic segmentation\n  --hypothalamus-html    check hypothalamic segmentation and create html\n                         summary page\n  --hippocampus          check segmentation of hippocampus and amygdala\n  --hippocampus-html     check segmentation of hippocampus and amygdala\n                         and create html summary page\n  --hippocampus-label    specify label for hippocampus segmentation files\n                         (default: T1.v21). The full filename is then\n                         [lr]h.hippoAmygLabels-<LABEL>.FSvoxelSpace.mgz\n  --shape                run shape analysis\n  --outlier              run outlier detection\n  --outlier-table        specify normative values (only in conjunction with\n                         --outlier)\n  --fastsurfer           use FastSurfer instead of FreeSurfer output\n  --exit-on-error        terminate the program when encountering an error;\n                         otherwise, try to continue with the next module or\n                         case\n\ngetting help:\n  -h, --help            display this help message and exit\n  --more-help           display extensive help message and exit\n\nexpert options:\n  --screenshots_base <image>\n                        filename of an image that should be used instead of\n                        norm.mgz as the base image for the screenshots. Can be\n                        an individual file (which would not be appropriate for\n                        multi-subject analysis) or can be a file without\n                        pathname and with the same filename across subjects\n                        within the 'mri' subdirectory of an individual\n                        FreeSurfer results directory (which would be appropriate\n                        for multi-subject analysis).\n  --screenshots_overlay <image>\n                        path to an image that should be used instead of aseg.mgz\n                        as the overlay image for the screenshots; can also be\n                        none. Can be an individual file (which would not be\n                        appropriate for multi-subject analysis) or can be a file\n                        without pathname and with the same filename across\n                        subjects within the 'mri' subdirectory of an individual\n                        FreeSurfer results directory (which would be appropriate\n                        for multi-subject analysis).\n  --screenshots_surf <surf> [<surf> ...]\n                        one or more surface files that should be used instead\n                        of [lr]h.white and [lr]h.pial; can also be none. Can be\n                        one or more individual file(s) (which would not be\n                        appropriate for multi-subject analysis) or can be a\n                        (list of) file(s) without pathname and with the same\n                        filename across subjects within the 'surf' subdirectory\n                        of an individual FreeSurfer results directory (which\n                        would be appropriate for multi-subject analysis).\n  --screenshots_views <view> [<view> ...]\n                        one or more views to use for the screenshots in the form\n                        of x=<numeric> y=<numeric> and/or z=<numeric>. Order\n                        does not matter. Default views are x=-10 x=10 y=0 z=0.\n  --screenshots_layout <rows> <columns>\n                        layout matrix for screenshot images.\n\n```\n\n*Examples:*\n\n- Run the QC pipeline for all subjects found in `/my/subjects/directory`:\n\n```bash\nrun_fsqc --subjects_dir /my/subjects/directory --output_dir /my/output/directory\n```\n\n- Run the QC pipeline for two specific subjects that need to be present in `/my/subjects/directory`:\n\n```bash\nrun_fsqc --subjects_dir /my/subjects/directory --output_dir /my/output/directory --subjects mySubjectID1 mySubjectID2\n```\n\n- Run the QC pipeline for all subjects found in `/my/subjects/directory` after full FastSurfer processing:\n\n```bash\nrun_fsqc --subjects_dir /my/subjects/directory --output_dir /my/output/directory --fastsurfer\n```\n\n- Run the QC pipeline plus the screenshots module for all subjects found in `/my/subjects/directory`:\n\n```bash\nrun_fsqc --subjects_dir /my/subjects/directory --output_dir /my/output/directory --screenshots\n```\n\n- Run the QC pipeline plus the fornix pipeline for all subjects found in `/my/subjects/directory`:\n\n```bash\nrun_fsqc --subjects_dir /my/subjects/directory --output_dir /my/output/directory --fornix\n```\n\n- Run the QC pipeline plus the shape analysis pipeline for all subjects found in `/my/subjects/directory`:\n\n```bash\nrun_fsqc --subjects_dir /my/subjects/directory --output_dir /my/output/directory --shape\n```\n\n- Run the QC pipeline plus the outlier detection module for all subjects found in `/my/subjects/directory`:\n\n```bash\nrun_fsqc --subjects_dir /my/subjects/directory --output_dir /my/output/directory --outlier\n```\n\n- Run the QC pipeline plus the outlier detection module with a user-specific table of normative values for all subjects found in `/my/subjects/directory`:\n\n```bash\nrun_fsqc --subjects_dir /my/subjects/directory --output_dir /my/output/directory --outlier --outlier-table /my/table/with/normative/values.csv\n```\n\n- Note that the `--screenshots`, `--fornix`, `--shape`, and `--outlier` (and other) arguments can also be used in conjunction.\n\n### As a Python package\n\nAs an alternative to their command-line usage, the fsqc scripts can also be run\nwithin a pure Python environment, i.e. installed and imported as a Python package.\n\nUse `import fsqc` (or sth. equivalent) to import the package within a\nPython environment, and use the `run_fsqc` function from the `fsqc` module to\nrun an analysis.\n\nIn its most basic form:\n\n```python\nimport fsqc\nfsqc.run_fsqc(subjects_dir='/my/subjects/dir', output_dir='/my/output/dir')\n```\n\nSpecify subjects as a list:\n\n```python\nimport fsqc\nfsqc.run_fsqc(subjects_dir='/my/subjects/dir', output_dir='/my/output/dir', subjects=['subject1', 'subject2', 'subject3'])\n```\n\nAnd as a more elaborate example:\n\n```python\nimport fsqc\nfsqc.run_fsqc(subjects_dir='/my/subjects/dir', output_dir='/my/output/dir', subject_file='/my/subjects/file.txt', screenshots_html=True, surfaces_html=True, skullstrip_html=True, fornix_html=True, hypothalamus_html=True, hippocampus_html=True, hippocampus_label=\"T1.v21\", shape=True, outlier=True)\n```\n\n\nCall `help(fsqc.run_fsqc)` for further usage info and additional options.\n\n___\n\n## Citations\n\n- Esteban O, Birman D, Schaer M, Koyejo OO, Poldrack RA, Gorgolewski KJ; 2017;\n  MRIQC: Advancing the Automatic Prediction of Image Quality in MRI from Unseen\n  Sites; PLOS ONE 12(9):e0184661; doi:10.1371/journal.pone.0184661.\n\n- Wachinger C, Golland P, Kremen W, Fischl B, Reuter M; 2015; BrainPrint: a\n  Discriminative Characterization of Brain Morphology; Neuroimage: 109, 232-248;\n  doi:10.1016/j.neuroimage.2015.01.032.\n\n- Reuter M, Wolter FE, Shenton M, Niethammer M; 2009; Laplace-Beltrami\n  Eigenvalues and Topological Features of Eigenfunctions for Statistical Shape\n  Analysis; Computer-Aided Design: 41, 739-755; doi:10.1016/j.cad.2009.02.007.\n\n- Potvin O, Mouiha A, Dieumegarde L, Duchesne S, & Alzheimer's Disease\n  Neuroimaging Initiative; 2016; Normative data for subcortical regional volumes\n  over the lifetime of the adult human brain; Neuroimage: 137, 9-20; doi.org/10.1016/j.neuroimage.2016.05.016\n\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2019 Image Analysis, DZNE e.V.  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Quality control scripts for FastSurfer and FreeSurfer structural MRI data",
    "version": "2.0.1",
    "project_urls": {
        "documentation": "https://github.com/Deep-MI/fsqc",
        "homepage": "https://github.com/Deep-MI/fsqc",
        "source": "https://github.com/Deep-MI/fsqc",
        "tracker": "https://github.com/Deep-MI/fsqc/issues"
    },
    "split_keywords": [
        "fastsurfer",
        "freesurfer",
        "quality control",
        "quality assurance"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a07986c0f7337b6ae799325fedc32cf23bbc7796f3c839b846b42c8993d3fbd1",
                "md5": "402ddd088630f3acd5001eff3834d051",
                "sha256": "e8e92c4000068521d0bda0ed2c8cfc555f4634cde6e64527a43c33234cfcd3f2"
            },
            "downloads": -1,
            "filename": "fsqc-2.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "402ddd088630f3acd5001eff3834d051",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 66801,
            "upload_time": "2023-10-25T08:22:51",
            "upload_time_iso_8601": "2023-10-25T08:22:51.030958Z",
            "url": "https://files.pythonhosted.org/packages/a0/79/86c0f7337b6ae799325fedc32cf23bbc7796f3c839b846b42c8993d3fbd1/fsqc-2.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3de5ae22169a8837654c5811dd57c7901bafc46e69372ab5d78640a9dd703eb4",
                "md5": "b8425e6424a0eb350b64afbc1114c7c8",
                "sha256": "63fff97ee094f34669f853828ed9354160a6da1986a41a6dcffed4db59b057f7"
            },
            "downloads": -1,
            "filename": "fsqc-2.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "b8425e6424a0eb350b64afbc1114c7c8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 69591,
            "upload_time": "2023-10-25T08:22:52",
            "upload_time_iso_8601": "2023-10-25T08:22:52.913602Z",
            "url": "https://files.pythonhosted.org/packages/3d/e5/ae22169a8837654c5811dd57c7901bafc46e69372ab5d78640a9dd703eb4/fsqc-2.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-25 08:22:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Deep-MI",
    "github_project": "fsqc",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "fsqc"
}
        
Elapsed time: 0.13186s