No Description

Fabian Peter Hammerle 88a2a730e0 script: added param --source-types to optionally enable collection of ASHS volumes files 5 years ago
examples 1abafc1ed8 test `python -m` module call to increase coverage 5 years ago
freesurfer_volume_reader 8df9dbc392 fix failing coverage check due to pandas.concat() version branch 5 years ago
tests 1d0891eced Merge branch 'master' into ashs-script 5 years ago
.coveragerc 6b2c883982 coverage: enable branch management 5 years ago
.gitignore 43f43f806c git ignore coverage data 5 years ago
.pylintrc 0ca4226d54 added ashs.HippocampalSubfieldsVolumeFile.read_volumes_mm3() 5 years ago
.travis.yml 0a098ce5d1 travis-ci: fail if coverage < 100% 5 years ago
Pipfile b667c9bd79 travis-ci: configure pytest to create coverage report 5 years ago
Pipfile.lock b667c9bd79 travis-ci: configure pytest to create coverage report 5 years ago
README.md a7044df8ae readme: fix --source-types arg 5 years ago
setup.py 3af0d701e7 setup.py: added missing pytest-cov dependency 5 years ago

README.md

freesurfer-volume-reader

Build Status

Python script & library to read hippocampal subfield volumes computed by Freesurfer & ASHS

Install

pip3 install --user freesurfer-volume-reader
freesurfer-volume-reader --help

Usage

Freesurfer

export SUBJECTS_DIR=/my/freesurfer/subjects
freesurfer-volume-reader

or

freesurfer-volume-reader /my/freesurfer/subjects
freesurfer-volume-reader /my/freesurfer/subjects /other/freesurfer/subjects

or

from freesurfer_volume_reader import freesurfer

for volume_file in freesurfer.HippocampalSubfieldsVolumeFile.find('/my/freesurfer/subjects'):
    print(volume_file.subject, volume_file.hemisphere, volume_file.analysis_id)
    print(volume_file.read_volumes_mm3())
    print(volume_file.read_volumes_dataframe())

ASHS

export SUBJECTS_DIR=/my/ashs/subjects
freesurfer-volume-reader --source-types ashs

or

freesurfer-volume-reader --source-types ashs -- /my/ashs/subjects
freesurfer-volume-reader --source-types ashs -- /my/ashs/subjects /other/ashs/subjects

or

from freesurfer_volume_reader import ashs

for volume_file in ashs.HippocampalSubfieldsVolumeFile.find('/my/ashs/subjects'):
    print(volume_file.subject, volume_file.hemisphere, volume_file.correction)
    print(volume_file.read_volumes_mm3())
    print(volume_file.read_volumes_dataframe())

Freesurfer & ASHS

freesurfer-volume-reader --source-types ashs freesurfer-hipposf -- /my/subjects
freesurfer-volume-reader --source-types ashs freesurfer-hipposf -- /my/ashs/subjects /my/freesurfer/subjects /other/subjects

Tests

pip3 install --user pipenv
git clone https://github.com/fphammerle/freesurfer-volume-reader.git
cd freesurfer-volume-reader
pipenv run pylint freesurfer_volume_reader
pipenv run pytest