No Description

Fabian Peter Hammerle a7044df8ae readme: fix --source-types arg 5 years ago
examples 189dd5303c script: added param --source-types to optionally enable collection of ASHS volumes files; added column `source_type` 5 years ago
freesurfer_volume_reader d69fc4ae7b fix pylint ignore unexpected-keyword-arg instruction (pandas<0.23) 5 years ago
tests 88ea8b6f10 adapt ASHS bert dummy test data to fix tests failing inadvertently due different order of rows in frame 5 years ago
.gitignore 5af1308d8e git ignore build/ & dist/ 5 years ago
.pylintrc 0ca4226d54 added ashs.HippocampalSubfieldsVolumeFile.read_volumes_mm3() 5 years ago
.travis.yml 9f97bd4982 travis-ci: exclude pandas-version<=0.23 && python>=3.7 due to compile error 5 years ago
Pipfile 8fd97e7d69 added failing test covering invalid root path '/' 5 years ago
Pipfile.lock 8fd97e7d69 added failing test covering invalid root path '/' 5 years ago
README.md a7044df8ae readme: fix --source-types arg 5 years ago
setup.py 276b501c93 split __main__.py from __init__.py 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