Name | brainprint JSON |
Version |
0.4.0
JSON |
| download |
home_page | |
Summary | A package to compute BrainPrint (shape descriptors) from FastSurfer/FreeSurfer MRI segmentations |
upload_time | 2023-06-19 18:30:38 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.8 |
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. |
keywords |
neuroscience
smri
freesurfer
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
[![PyPI version](https://badge.fury.io/py/brainprint.svg)](https://pypi.org/project/brainprint/)
# BrainPrint
This is the `brainprint` python package, a derivative of the original
[BrainPrint-legacy](https://github.com/Deep-MI/BrainPrint-legacy) scripts,
with the primary goal to provide a Python-only version, to integrate the
[LaPy](https://github.com/Deep-MI/LaPy) package, and to remove dependencies
on third-party software (shapeDNA-* binaries, gmsh, meshfix). As a result,
some functionality of the original BrainPrint-legacy scripts is no longer
maintained (currently no support of tetrahedral meshes and no support of
cortical parcellations or label files).
## Installation
Use the following code to install the latest release of LaPy into your local
Python package directory:
`python3 -m pip install brainprint`
This will also install the necessary dependencies, e.g. the [LaPy](https://github.com/Deep-MI/LaPy)
package. You may need to add your local Python package directory to your $PATH
in order to run the scripts.
## Usage
### Command Line Interface (CLI)
Once installed, the package provides a `brainprint` executable which can be run from the command line.
The `brainprint` CLI enables per-subject computation of the individual brainprint descriptors. Its usage and options are summarized below;
detailed info is available by calling the script without any arguments from the command line.
```sh
brainprint --sdir <directory> --sid <SubjectID> [--num <num>] [--evec] [--skipcortex] [--norm <surface|volume|geometry|none> ] [--reweight] [--asymmetry] [--outdir <directory>] [--help] [--more-help]
Options:
--help Show this help message and exit
--more-help Show extensive help message and exit
Required options:
--sid <SubjectID>
Subject ID (FreeSurfer-processed directory inside the
subjects directory)
--sdir <directory>
FreeSurfer subjects directory
Processing directives:
--num <num> Number of eigenvalues/vectors to compute (default: 50)
--evec Switch on eigenvector computation (default: off)
--skipcortex Skip cortical surfaces (default: off)
--norm <surface|volume|geometry|none>
Switch on eigenvalue normalization; will be either surface,
volume, or determined by the geometry of the object. Use
"none" or leave out entirely to skip normalization.
--reweight Switch on eigenvalue reweighting (default: off)
--asymmetry Perform left-right asymmetry calculation (default: off)
--cholmod Switch on use of (faster) Cholesky decomposition instead
of (slower) LU decomposition (default: off). May require
manual install of scikit-sparse package.
Output parameters:
--outdir=OUTDIR Output directory (default: <sdir>/<sid>/brainprint)
--keep-temp Whether to keep the temporary files directory or not
by default False
```
### Python Package
`brainprint` can also be run within a pure Python environment, i.e. installed and imported as a Python package. E.g.:
```python
>>> from brainprint import Brainprint
>>> subjects_dir = "/path/to/freesurfer/subjects_dir/"
>>> subject_id = "42"
>>> bp = Brainprint(subjects_dir=subjects_dir, asymmetry=True, keep_eigenvectors=True)
>>> results = bp.run(subject_id=subject_id)
>>> results
{"eigenvalues": PosixPath("/path/to/freesurfer/subjects_dir/subject_id/brainprint/subject_id.brainprint.csv"), "eigenvectors": PosixPath("/path/to/freesurfer/subjects_dir/subject_id/brainprint/eigenvectors"), "distances": PosixPath("/path/to/freesurfer/subjects_dir/subject_id/brainprint/subject_id.brainprint.asymmetry.csv")}
```
## Output
The script will create an output directory that contains a CSV table with
values (in that order) for the area, volume, and first n eigenvalues per each
FreeSurfer structure. An additional output file will be created if the
asymmetry calculation is performed and/or for the eigenvectors (CLI `--evecs` flag or `keep_eigenvectors` on class initialization).
## Changes
There are some changes in functionality in comparison to the original [BrainPrint](https://github.com/Deep-MI/BrainPrint-legacy)
scripts:
- currently no support for tetrahedral meshes
- currently no support for analyses of cortical parcellation or label files
- no more Python 2.x compatibility
## References
If you use this software for a publication please cite:
[1] BrainPrint: a discriminative characterization of brain morphology. Wachinger C, Golland P, Kremen W, Fischl B, Reuter M. Neuroimage. 2015;109:232-48. http://dx.doi.org/10.1016/j.neuroimage.2015.01.032 http://www.ncbi.nlm.nih.gov/pubmed/25613439
[2] Laplace-Beltrami spectra as 'Shape-DNA' of surfaces and solids. Reuter M, Wolter F-E, Peinecke N Computer-Aided Design. 2006;38:342-366. http://dx.doi.org/10.1016/j.cad.2005.10.011
Raw data
{
"_id": null,
"home_page": "",
"name": "brainprint",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "Martin Reuter <martin.reuter@dzne.de>",
"keywords": "neuroscience,sMRI,FreeSurfer",
"author": "",
"author_email": "Martin Reuter <martin.reuter@dzne.de>, Kersten Diers <kersten.diers@dzne.de>",
"download_url": "https://files.pythonhosted.org/packages/70/13/22623976850a48fbd22cec4277f44c0a6dc61c314990fd8b5c51ae47f567/brainprint-0.4.0.tar.gz",
"platform": null,
"description": "[![PyPI version](https://badge.fury.io/py/brainprint.svg)](https://pypi.org/project/brainprint/)\n# BrainPrint\n\nThis is the `brainprint` python package, a derivative of the original\n[BrainPrint-legacy](https://github.com/Deep-MI/BrainPrint-legacy) scripts,\nwith the primary goal to provide a Python-only version, to integrate the\n[LaPy](https://github.com/Deep-MI/LaPy) package, and to remove dependencies\non third-party software (shapeDNA-* binaries, gmsh, meshfix). As a result,\nsome functionality of the original BrainPrint-legacy scripts is no longer\nmaintained (currently no support of tetrahedral meshes and no support of\ncortical parcellations or label files).\n\n## Installation\n\nUse the following code to install the latest release of LaPy into your local\nPython package directory:\n\n`python3 -m pip install brainprint`\n\nThis will also install the necessary dependencies, e.g. the [LaPy](https://github.com/Deep-MI/LaPy)\npackage. You may need to add your local Python package directory to your $PATH\nin order to run the scripts.\n\n## Usage\n### Command Line Interface (CLI)\n\nOnce installed, the package provides a `brainprint` executable which can be run from the command line.\n\nThe `brainprint` CLI enables per-subject computation of the individual brainprint descriptors. Its usage and options are summarized below;\ndetailed info is available by calling the script without any arguments from the command line.\n\n```sh\nbrainprint --sdir <directory> --sid <SubjectID> [--num <num>] [--evec] [--skipcortex] [--norm <surface|volume|geometry|none> ] [--reweight] [--asymmetry] [--outdir <directory>] [--help] [--more-help]\n\nOptions:\n --help Show this help message and exit\n --more-help Show extensive help message and exit\n\nRequired options:\n --sid <SubjectID>\n Subject ID (FreeSurfer-processed directory inside the\n subjects directory)\n --sdir <directory>\n FreeSurfer subjects directory\n\nProcessing directives:\n --num <num> Number of eigenvalues/vectors to compute (default: 50)\n --evec Switch on eigenvector computation (default: off)\n --skipcortex Skip cortical surfaces (default: off)\n --norm <surface|volume|geometry|none>\n Switch on eigenvalue normalization; will be either surface,\n volume, or determined by the geometry of the object. Use\n \"none\" or leave out entirely to skip normalization.\n --reweight Switch on eigenvalue reweighting (default: off)\n --asymmetry Perform left-right asymmetry calculation (default: off)\n --cholmod Switch on use of (faster) Cholesky decomposition instead\n of (slower) LU decomposition (default: off). May require \n manual install of scikit-sparse package. \n\nOutput parameters:\n --outdir=OUTDIR Output directory (default: <sdir>/<sid>/brainprint)\n --keep-temp Whether to keep the temporary files directory or not\n by default False\n```\n\n### Python Package\n\n`brainprint` can also be run within a pure Python environment, i.e. installed and imported as a Python package. E.g.:\n\n```python\n>>> from brainprint import Brainprint\n\n>>> subjects_dir = \"/path/to/freesurfer/subjects_dir/\"\n>>> subject_id = \"42\"\n\n>>> bp = Brainprint(subjects_dir=subjects_dir, asymmetry=True, keep_eigenvectors=True)\n>>> results = bp.run(subject_id=subject_id)\n>>> results\n{\"eigenvalues\": PosixPath(\"/path/to/freesurfer/subjects_dir/subject_id/brainprint/subject_id.brainprint.csv\"), \"eigenvectors\": PosixPath(\"/path/to/freesurfer/subjects_dir/subject_id/brainprint/eigenvectors\"), \"distances\": PosixPath(\"/path/to/freesurfer/subjects_dir/subject_id/brainprint/subject_id.brainprint.asymmetry.csv\")}\n```\n\n## Output\n\nThe script will create an output directory that contains a CSV table with\nvalues (in that order) for the area, volume, and first n eigenvalues per each\nFreeSurfer structure. An additional output file will be created if the\nasymmetry calculation is performed and/or for the eigenvectors (CLI `--evecs` flag or `keep_eigenvectors` on class initialization).\n\n## Changes\n\nThere are some changes in functionality in comparison to the original [BrainPrint](https://github.com/Deep-MI/BrainPrint-legacy)\nscripts:\n\n- currently no support for tetrahedral meshes\n- currently no support for analyses of cortical parcellation or label files\n- no more Python 2.x compatibility\n\n## References\n\nIf you use this software for a publication please cite:\n\n[1] BrainPrint: a discriminative characterization of brain morphology. Wachinger C, Golland P, Kremen W, Fischl B, Reuter M. Neuroimage. 2015;109:232-48. http://dx.doi.org/10.1016/j.neuroimage.2015.01.032 http://www.ncbi.nlm.nih.gov/pubmed/25613439\n\n[2] Laplace-Beltrami spectra as 'Shape-DNA' of surfaces and solids. Reuter M, Wolter F-E, Peinecke N Computer-Aided Design. 2006;38:342-366. http://dx.doi.org/10.1016/j.cad.2005.10.011\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": "A package to compute BrainPrint (shape descriptors) from FastSurfer/FreeSurfer MRI segmentations",
"version": "0.4.0",
"project_urls": {
"documentation": "https://github.com/Deep-MI/BrainPrint",
"homepage": "https://github.com/Deep-MI/BrainPrint",
"source": "https://github.com/Deep-MI/BrainPrint",
"tracker": "https://github.com/Deep-MI/BrainPrint/issues"
},
"split_keywords": [
"neuroscience",
"smri",
"freesurfer"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "13817e76fd5868d7d37a7618fbbe4b5ae86913efc6b14d006eb780959fcca922",
"md5": "72461f5da728ab53dacea44e51e2ac59",
"sha256": "375425f82341378f74d5f03263bd3641ccc14b72ccaa6ef44d5d33c22e8903a4"
},
"downloads": -1,
"filename": "brainprint-0.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "72461f5da728ab53dacea44e51e2ac59",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 20476,
"upload_time": "2023-06-19T18:30:36",
"upload_time_iso_8601": "2023-06-19T18:30:36.643178Z",
"url": "https://files.pythonhosted.org/packages/13/81/7e76fd5868d7d37a7618fbbe4b5ae86913efc6b14d006eb780959fcca922/brainprint-0.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "701322623976850a48fbd22cec4277f44c0a6dc61c314990fd8b5c51ae47f567",
"md5": "55104e89ca2ef0ac2de3db323936e3cf",
"sha256": "6f3844dfbbcc3ae0b262c2c8c2482f8a83d51779e2824d2c155bd43da782ab54"
},
"downloads": -1,
"filename": "brainprint-0.4.0.tar.gz",
"has_sig": false,
"md5_digest": "55104e89ca2ef0ac2de3db323936e3cf",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 19737,
"upload_time": "2023-06-19T18:30:38",
"upload_time_iso_8601": "2023-06-19T18:30:38.104629Z",
"url": "https://files.pythonhosted.org/packages/70/13/22623976850a48fbd22cec4277f44c0a6dc61c314990fd8b5c51ae47f567/brainprint-0.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-06-19 18:30:38",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Deep-MI",
"github_project": "BrainPrint",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "brainprint"
}